02-28-2019 02:27 PM
I have a Multi File Reader reading a series of S3 files using a wildcard, and writing the data to Snowflake. There is a Mapper in between. Functionally, everything is working as expected.
I’d like to get the name of the file in which the data was read, and write it to a Meta_FileName column. How do I retrieve the file name from the Multi File Reader? I’m sort of assuming it’s an expression to be added in the Mapper but not sure. TIA!
02-28-2019 03:07 PM
Is there a parser snap that is converting the binary documents?
03-01-2019 06:29 AM
My apologies for lack of detail, yes there is indeed a CSV parser following the multi file reader.
08-19-2019 04:13 PM
It’s currently not possible to pass the binary header that contains the file name through the CSVParser. Instead, you can use a DirectoryBrowser snap to get the file names and then kick off child pipelines to read the files and do the SnowflakeUpserts. In that case, you’ll be passing the filename as a pipeline parameter to the child pipeline, so you can use a Mapper to add the parameter into the documents that are going into the Upsert. A side-benefit of this is that you can process multiple files in parallel.
08-19-2019 01:21 PM
hi tstack,
Is there an inbuilt snaplogic functionality for the same ?