Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a json payload with 50 fields. I need to convert the same and upload to an endpoint.
The twist is the field names have space between them. e.g First Name.
I am using tExtracJson and tFileOutputdelimited. This component doesnt accept space.
Can someone suggest how to resolve this issue without having to replace the space with no space or underscore.
Thanks
You cannot put spaces in headers because they are essentially variables. This can be pain sometimes. However, there is an easy solution (hack) for this. You have a process where you are moving data from JSON to CSV. I assume that works. What you need to do is change the config of the file output component to NOT include the header and to "Append". Then before this process(subjob) takes place, create another subjob with the sole purpose of writing the header. Use a tFixedFlowInput with one row and hard code your header names. You can have whatever you want. Connect this to a file output component (not the one you are already using) and make sure "Append" is unticked and"Include Header" is unticked.
What this does is write a single row at the beginning of a new file....this is your header row. You then append to that file with the flow of data you already have.
Hi,
I tried the approach. It populates the header. But I need the csv file to be generated like this:
Field1,Field2,Field3,Field4, etc
Currently I am getting it as
Field1
Field2
Field3
Field4
Screen shot of my setting is attached. I tried various approaches and apart from hardcoding, nothing seems to work.
Got the solution. Thanks