jannis_voigt
03/07/2023, 9:48 PMjacob_matson
03/07/2023, 9:54 PMpath: ../csv_files/*.csv
have you tried that?pat_nadolny
03/08/2023, 1:24 AMconfig:
files:
- entity: customers
path: ../csv_files/customers.csv
keys:
- id
- entity: orders
path: ../csv_files/orders.csv
keys:
- id
If you have many files with the same schema in a directory then it will read all of them as one "stream".jannis_voigt
03/09/2023, 5:21 PMpat_nadolny
03/09/2023, 5:33 PMmeltano run tap-csv target-postgres with the config above you should get two tables: customers and orders. And by default they'd go in a schema named after the tap like tap_csv.customers and tap_csv.ordersjannis_voigt
03/09/2023, 6:07 PMpat_nadolny
03/09/2023, 6:36 PMpat_nadolny
03/09/2023, 6:39 PM/.../top_directory/my_meltano_project/meltano.yml
- name: tap-csv
variant: meltanolabs
pip_url: git+<https://github.com/MeltanoLabs/tap-csv.git>
config:
files:
- entity: test_file
path: ../test_data/
keys:
- col1
given a directory one level above in /.../top_directory/test_data/ that contains file1.csv and file2.csvpat_nadolny
03/09/2023, 6:40 PMjannis_voigt
03/09/2023, 7:02 PMmeltano run tap-csv target-postgres
Thank you for your help.pat_nadolny
03/09/2023, 7:42 PMI want each csv file in a different table. Their structure is not the same, however they are pretty similar.I think you'll need to define these as separate entities in your config. The tap doesnt know to separate the files as different streams/tables unless you define them separately
pat_nadolny
03/09/2023, 7:43 PMjannis_voigt
03/10/2023, 8:39 AM