07-30-2020 06:17 PM
Hi,
i`m trying the example pipeline named “test_JSON_Formatter”
Json generator → Mapper → Json Formater → File Writer
in Mapper i have:
Expression: _p_run_id.length != 0 ? $PAYLOAD.interface_id : $interface_id
Target path : $interface_id
in Json Formatter: i put nothing
In File Writer:
I want to append the filename with the content of the json element interface_id
i tried this c://temp//“test”+ $interface_id+“.xml”
but it returns error : interface_id is not defined
Where shoud i define the interface_id?
How snaplogic gets its content from the json?
Thank you
07-31-2020 01:06 AM
Hi @2020,
Should you try and add an entry in the Binary header properties section of the JSON Formatter Settings, like so:
then you should be able to use it in the File Writer, like so:
Hope this helps.
BR,
Dimitri
07-31-2020 08:50 AM
Hi @2020,
To be fair, I tested the solution in my previous response by writing to sldb.
So I see now that the path in the File Name property in my response won’t work, because the format differs from the one in the example in the File Writer documentation.
I don’t have access to the Groundplex of the organization I used to test my answer. So I can’t test by writing the file that way.
As for the SMB protocol, I do use it in my work, but the path I use has a valid URL of a company server.
My guess is, when you are trying to write to the file system on the Groundplex, perhaps you lack permissions, or you maybe even have a stray quote sign in your path.
I’m sorry I can’t be of more help.
BR,
Dimitri
07-31-2020 08:56 AM
Thank you
it`s ok you can close this thread.