I am new to CloverETL. I would like to create 1 large json file from 2 sub json files (part-a.json, part-b.json).
Sample part-a.json file is,
{
“PERSON_ENTPRS_ID” : 1001,
“PopArray” : [ {
“GNDR_CD” : “M”,
“MBR_AGE_NO” : 10,
“PERSON_ENTPRS_ID” :1001,
“Year” : “2010”
}, {
“GNDR_CD” : “M”,
“MBR_AGE_NO” : 10,
“PERSON_ENTPRS_ID” :1001,
“Year” : “2010”
} ],
…
}
Sample Part-b.json
{
“DxArray” : [ {
“HLH_EVNT_SK” : “19540000”,
“DX_CD” : “380.10”,
“DX_TP_CD” : “P”,
“PERSON_ENTPRS_ID” : 1001
}, {
“HLH_EVNT_SK” : “19540000”,
“DX_CD” : “380.10”,
“DX_TP_CD” : “P”,
“PERSON_ENTPRS_ID” : 1001
}]
…
}
Steps I followed are as follows:
1. Read the part-a.json file using universal reader, and disable the quoting to read it as string.
2. Read the part-b.json file using universal reader, and disable the quoting to read it as string.
I am not using the JSON READER, because my large file has keys with ‘_’. I dont want to go through 1000 keys to change back to ‘-’ or escape it
Now what I want to do is combine the outputs of two readers and write to one file. So the output file will contain json arrays from both files. Also, I just want to combine these files, no transformation are manipulation is required.
please help?
Thanks so much.
Prashant