Combining JSON output into a single field
Shawn_21372
Altair Community Member
Hi,
I have a file with data in JSON format that is an output from a Dataprep Studio workspace. I would like to combine this output into a single field which would eventually be appended with another file that is being ingested into a database table. Here is an example of the JSON file:
[ { "Field1": "1", "Field2": "2", }, { "Field1": "1", "Field2": "2", } ]
Here is an example of the final format that would be loaded to a database table:
Field1 | Field2 | JsonOutput | Field4 |
Some value | 2 | [ { "Field1": "1", "Field2": "2", }, { "Field1": "1", "Field2": "2", } ] | Some Value |
Is there any way out of the box I can combine the JSON file into a essentially a single field?
Thanks!
0
Answers
-
Hi Shawn,
Great question. I have made an attempt to simulate this. Here's what I did.
- I created a classic model to capture the data from the JSON file like a text file.
- I then used the data prep studio functions to clean it up to extract a unique identifier (in this case Account Number)
- Finally I joined the two tables together.
Not sure if this is exactly what you're looking for, but I hope it at least gives you some ideas. I've attached the files a well as a reference.
1