cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

CSV Formatter Error

IshanT1
New Contributor II

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.
image

Child Pipeline
Capture3

Please let me know if you need any further information and as always thanks for your help in advance.

1 ACCEPTED SOLUTION

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

View solution in original post

5 REPLIES 5

dimitri_hristov
Contributor

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

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.
Capture6 Capture5 Capture4

Thanks,
Ishan

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

IshanT1
New Contributor II

Hi @dimitri.hristovski,

Unchecking the โ€˜pass throughโ€™ checkbox in the Mapper did the trick.
Thanks for your help again.

Best,
Ishan