โ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