Using Azure Data Factory I have created a pipeline to upload any number of JSON files from Azure blob storage. I am loading the JSON data into a stage table with the following fields
- FileName varchar(200)
- JSONData nvarchar(max)
Using the SQL Server OPENJSON
command, only 5,000 rows are returned, when there should be over 400,000 rows returned.
I used this query to parse the JSON data column into a final table (some info redacted):
insert into jsonTable
select *
from OPENJSON((select jsondata from rawJSONupload
where filename = 'filename'))
with (
field1 nvarchar(5),
field2 real,
field3 real,
EnteredDate datetime,
FilePath nvarchar(500)
)
My issue is that I am only getting 5,000 rows returned from the SELECT * FROM OPENJSON(...)
query, where I know that I should have 400,000+ rows returned. Is there a max of 5,000 rows returned using OPENJSON
, and if so is there a way around that, or do I need to find another way to load JSON data into a table (not one at a time).