Pgloader: Import from multiple CSV files

Created on 4 May 2016  路  4Comments  路  Source: dimitri/pgloader

Can find if it is already present but I need have import from multiple CSV files by filename template.

How To... Question

Most helpful comment

The order of the in directory was important and wasn't clear to me from the docs. I got this working:

LOAD FIXED  
  FROM all filenames matching ~<saltsnck_[drug|groc]>
     in directory '~/Development/DSE/DSE220/IRI_Data/Year1/External/saltsnck/'

Thanks.

All 4 comments

Can you use the FILENAMES MATCHING feature as described in the documentation?

[ ALL FILENAMES | [ FIRST ] FILENAME ]  
MATCHING regexp  
[ IN DIRECTORY '...' ] 

@dimitri The documentation doesn't suggest the ALL FILENAMES MATCHING works for FIXED files. Also, I tried it and it complains about a syntax error. Should this work for FIXED too?

A very quick glance at the parser code makes me believe it should work. Can you paste more details, such as your command and the error message?

The order of the in directory was important and wasn't clear to me from the docs. I got this working:

LOAD FIXED  
  FROM all filenames matching ~<saltsnck_[drug|groc]>
     in directory '~/Development/DSE/DSE220/IRI_Data/Year1/External/saltsnck/'

Thanks.

Was this page helpful?
0 / 5 - 0 ratings