Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to Flatten JSON object in Data Fusion

Hi,

I am trying to parse JSON object in structured format in cloud data fusion, please tell me correct procedure for it. I tried using JSON parser for the same but somehow there is no clear understanding of how to leverage it and I can't find any information related to it over internet. 

 

0 2 1,303
2 REPLIES 2

RC1
Bronze 4
Bronze 4

@sheetal22 I found two ways to do this.

1) Use this transformation `JSON Parser Transformation` [ https://cdap.atlassian.net/wiki/spaces/DOCS/pages/512197009/JSON+Parser+Transformation

2) Use Pyspark /Python in cloud data fusion and write your own code for unnesting json.

Hi,
Thank you for this solution. I explored JSON Parser transformation option, but it seems to require manual input and can't be automated. Let me know if you think otherwise. 
For second option, do you have any example or sample code that I can look at?