Forum Discussion

Gitanjali's avatar
Gitanjali
New Contributor II
2 years ago

using prefixfor filename using mapper output view's pass through option

Sharing a part of my whole pipeline flow is:

Router snap --> oracle_execute snap (fetches data from oracle db via slect statement) --> mapper --> csv formatter --> file writer

The mapper input view is of the format:

[

  {

     "key1": "Key1",

      "key2": "Key2",

      "key3": {

             "subkey1": "sub key 1"

        }

  }

]

I want to create csv file using fields: "key1" and "key2".

However, I want to use the field: "key3"."subkey1" in file_writer snap to use as suffix in filename. 

If I select the pass through option in mapper and create target schema mapping only for key1 and key2; the csv formatter snap fails saying that flattened input is required.

 

How can I resolve this?