Koushik Chandra
Koushik Chandra

Reputation: 1491

parsing nexted json in databricks delta live tables

1st Question => Can we parse a nested JSON through SQL notebook and load the same in a delta live table ?

2nd Question => I am able to parse nested JSON using python notebook and able to print that. But can I load the data in a delta live table from there?

Upvotes: 0

Views: 1079

Answers (1)

Jishan Shaikh
Jishan Shaikh

Reputation: 1806

Can we parse a nested JSON through SQL notebook and load the same in a delta live table?

You can parse a nested JSON in a SQL notebook in Databricks Delta and load the data into a Delta live table, by using the built-in JSON functions in SQL. You can use the from_json to parse the nested JSON data and then use the INSERT INTO to load the data into a Delta live table.

I am able to parse nested JSON using python notebook and able to print that. But can I load the data in a delta live table from there?

Yes, you can load the data parsed from a nested JSON in a Python notebook into a Delta live table, by first parsing the JSON (using Python's json module or pandas), then creating a DataFrame using the parsed data and then use the write method of the DataFrame to write the data to a Delta live table.

Upvotes: 0

Related Questions