Reputation: 33
I have large numbers of files within s3 bucket and usually import it to Redshift. Since number of files is large I need a column in Redshift table which should contain source file name from s3 location.
Is there any means to carried out problem ?
Upvotes: 3
Views: 1842
Reputation: 26
Agree with Ketan that this is currently not possible in Redshift. If this is what you would want to achieve, it is possible through either
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+VirtualColumns
Hope this helps.
Upvotes: 1
Reputation: 5649
That isn't possible. During a Copy
operation, Redshift only loads file contents into a table; it doesn't provide access to S3 file names.
To achieve what you want, you need to preprocess the data to add additional information inside the files.
Upvotes: 1