06-18-2020 06:29 AM
Hi,
I am trying to create a CSV file by querying data from snowflake. I have a parent pipeline which is passing output file name & path as parameter to my child pipeline through pipeline execute.
When I am validating the child pipeline, everything is working normal but when I am running the parent, I am getting below error on the child pipeline at CSV Formatter step.
“Snap errors: {ruuid=58b7a2f5ba6d563aff5d73d9_8faf50a9-40dc-441e-9003-454d2c650b2d, reason=Input document should be a flattened map data, but found: LinkedHashMap, label=CSV Formatter, resolution=Please make sure the input document a flattened map data., failure=Cannot format CSV data}”.
Below is the parent pipeline.
Child Pipeline
Please let me know if you need any further information and as always thanks for your help in advance.
Solved! Go to Solution.
06-18-2020 09:25 AM
Hi,
Given that I can’t see the state of the ‘Pass through’ property in the Mapper3 Snap, I’d try and unselect the checkbox if it is selected. That will ensure that if there are any other fields received on the Mapper Snap’s input, they won’t be forwarded to the output.
BR,
Dimitri
06-18-2020 08:55 AM
Hi @IshanT1, welcome to the Community 🙂
So, at first glance, I’d venture to guess that when you run the child pipeline by calling it from the parent pipeline, in the output of the snap called ‘Summary File Data’ you have the $original object. Naturally, the $original object has nested fields, so it’s not a flat structure and the CSV Formatter exits with an error.
If such is the case, then you should remove the $original object from the input to the CSV Formatter, for instance by means of a Mapper Snap.
Hope this helps.
BR,
Dimitri
06-18-2020 09:08 AM
Hi @dimitri.hristovski ,
Thanks for your response.
‘Summary File Data’ snap is snowflake execute and running a very simple select statement.
As suggested I tried to add a mapper between “Summary File Data” and CSV formatter but still getting the same error.
Adding more snapshots in the thread about the settings of each snap in the child pipeline.
Thanks,
Ishan
06-18-2020 09:25 AM
Hi,
Given that I can’t see the state of the ‘Pass through’ property in the Mapper3 Snap, I’d try and unselect the checkbox if it is selected. That will ensure that if there are any other fields received on the Mapper Snap’s input, they won’t be forwarded to the output.
BR,
Dimitri
06-18-2020 10:56 AM
Unchecking the ‘pass through’ checkbox in the Mapper did the trick.
Thanks for your help again.
Best,
Ishan