Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

0 votes
2 answers
158 views

Parse Google API JSON file to rows and columns with OPENJSON in T-SQL

So I am trying to create a query than can handle a json file that we get with a data factory web request from the Google Analytics API 4 and store the result in an Azure sql table. The following query ...
Rogero Wisehombre's user avatar
0 votes
0 answers
166 views

Join large table with JSON data with another table

We are using Azure SQL database having tables for saving document information, document approvers, package information etc. In document information table we save metadata in JSON string since metadata ...
Sushrut Paranjape's user avatar
0 votes
1 answer
135 views

pyodbc azure sql server error in saving json using openjson

i want to save a json array into azure sql server, but i am getting this error: \serverCalls\sqlManager.py", line 95, in populateNewsLatest curse.execute(f""" pyodbc.Error: ('07002'...
utkarsh choudhary's user avatar
1 vote
2 answers
2k views

How to join 2 tables, where data in one table has JSON data that needs to be parsed?

I'm struggling with some SQL, which should both join data from two tables together, but where I also need to parse a JSON array, into rows in the output table... Here are examples of my 2 tables that ...
John McDonnell's user avatar
1 vote
1 answer
129 views

How to implement OPENJSON Having JSON code as a text inside a column. How do i use OPENJSON on the column of a table in AZURE SQL Dataware House?

Eg: RAW DATA | ORDER# | SUBORDER# | DISCOUNTS | |------- |-----------| -------------------------------| | 1 | 1-123 | '[{ discount:"1",amount:"1"}]' | ...
syed ahmed's user avatar
1 vote
1 answer
184 views

Parse JSON SQL with OPENJSON skipping OBJECTS

I'm trying to parse a json file using OPENJSON in Azure sql but I want to do a specific mapping in my new table. I have a json file which looks like this with many y0_1, y0_2, ....y0_380. {"...
Zin's user avatar
  • 23
2 votes
2 answers
972 views

Using TSQL OPENJSON how do I extract a value from JSON array with a dynamic key name

I have a json document with an internal array of attributes. On one of these attributes, the key name changes dynamically/randomly. I can easily extract all the data points except for this last pesky ...
K_OFLYNN's user avatar
0 votes
1 answer
538 views

Create table from openjson(@json) results Azure SQL

I am trying to make a table out of the [key] row values from a select * from openjson(@json) statement. The openjson(@json) statement gives me results that contains 53 [key] row values, here's a ...
Katt's user avatar
  • 21