Forum Discussion
Please find the attached sample pipeline:
Sample_pipe_2022_01_15.slp (7.9 KB)
Hope this helps.
Regards,
Spiro Taleski
Hi Spiro,
i am getting an error on the join shape .
.
not sure what i am doing wrong. my multifile reader is set with a wildcard and the subfolders option is checked. any idea what might be the cause of this error ?
- SpiroTaleski4 years agoValued Contributor
Hmm, the same code it is working on my side. So, I am wondering if the file data can have some impact.
Could you try to re-drag the Join Snap(first delete existing Join, and drag new one from Snap Pallet again), and add the same configuration.
Inner Join with “1” for Left and Right Join Paths.
Regards,
Spiro Taleski- sghneim4 years agoNew Contributor
i did delete the join and dragged a new one to the canvas , the set up is below but still no luck with this .
- SpiroTaleski4 years agoValued Contributor
Strange.
As a workaround, you can achieve the same by using Directory Browser Snap and Parent-Child pipeline configuration.
-
Parent Pipeline
- Use Directory Browser Snap to list the files from s3 location
- Use Pipeline Execute Snap to call the child pipeline and send the file name as a pipeline parameter
-
Child Pipeline
- Create pipeline parameter to receive the file names from the Parent pipeline.
- Read the files using File Reader Snap
- Map the content and file name from parameter using Mapper Snap
This is actually what was proposed above by tstack.
t’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.
Regards,
Spiro Taleski -