cancel
Showing results for 
Search instead for 
Did you mean: 

accessing json contents without a schema

rm135
Deputy Chef II
Deputy Chef II

Hi, 

I'm retreiving sign in logs from MS graph via HTTP. The schema is complex and seems to change a lot so I've had issues trying to define a proper schema for data pills. 

I would really just like to access one of the high level json objects and be able to use it as data I would save to a file or pass to a snowflake field. 

e.g. in python I would just use 

response.json()['value']

 

is this possible?

6 REPLIES 6

rajeshjanapati
Deputy Chef III
Deputy Chef III

Hi @rm135,

After reviewing your issue, I’d recommend using a Python script step to extract the specific object from the response — particularly when the response schema is dynamic or frequently changing.

For instance, you can extract the array using, when it is structured json only:

response.json()['value']

Once you've extracted the required portion of the JSON (like the value array), you can pass the output of the Python script to a Parse JSON step. From there, you’ll be able to map the fields easily to the Snowflake step.

Using formulas to handle dynamic structures can become complex and error-prone. In such scenarios, a Python script provides better flexibility and control over dynamic JSON structures.

Obugari
Deputy Chef III
Deputy Chef III

Hi @rm135 
In HTTP call at response you can define the output schema (it generate each field) . At next step you can use the datapills to map snowflake.
Second Approach - You can use Parse Json step . so it generated data pills 

Thankyou