EndPoint Read JSON File (Generic)
Parameters
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. |
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. |
Examples
SSIS
Use SharePoint Online Connector in API Source component to read data or in API Destination component to read/write data:
Read JSON File (Generic) using API Source

Read JSON File (Generic) using API Destination

ODBC application
Use these SQL queries in your ODBC application data source:
Read JSON File from SharePoint Document Library (Parse Rows and Columns without downloading)
This example shows how to read a JSON file from SharePoint Document Library without downloading on Disk (Streaming approach).
SELECT * from get_json_file
WITH(
DriveId='b!0zqXLXXJh0uUMzl-JXAd9Ztngc-5utVDqRyD2lKpD2535-11HLQTR5z4hOzmA7Q0'
, FileId='root:/MyFolder/dump.json:'
, Filter='$.store.books[*]' --or just blank (see help file for more filter examples)
--to read compressed file use below way
--, FileId='root:/MyFolder/dump.json.gz:'
--, FileCompressionType='GZip' --None, GZip, Zip
)
Read Zip/Gzip Compressed JSON File from SharePoint Document Library (Parse Rows and Columns without downloading)
This example shows how to read a compressed JSON file (Zip or Gzip) from SharePoint Document Library without downloading on the Disk (Streaming approach).
SELECT * from get_json_file
WITH(
DriveId='b!0zqXLXXJh0uUMzl-JXAd9Ztngc-5utVDqRyD2lKpD2535-11HLQTR5z4hOzmA7Q0'
, FileId='root:/MyFolder/dump.json.zip:'
, Filter='$.store.books[*]' --or just blank (see help file for more filter examples)
, FileCompressionType='Zip' --None, GZip, Zip
)
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Read JSON File from SharePoint Document Library (Parse Rows and Columns without downloading)
This example shows how to read a JSON file from SharePoint Document Library without downloading on Disk (Streaming approach).
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * from get_json_file
WITH(
DriveId=''b!0zqXLXXJh0uUMzl-JXAd9Ztngc-5utVDqRyD2lKpD2535-11HLQTR5z4hOzmA7Q0''
, FileId=''root:/MyFolder/dump.json:''
, Filter=''$.store.books[*]'' --or just blank (see help file for more filter examples)
--to read compressed file use below way
--, FileId=''root:/MyFolder/dump.json.gz:''
--, FileCompressionType=''GZip'' --None, GZip, Zip
)';
EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHAREPOINT_ONLINE_IN_DATA_GATEWAY];
Read Zip/Gzip Compressed JSON File from SharePoint Document Library (Parse Rows and Columns without downloading)
This example shows how to read a compressed JSON file (Zip or Gzip) from SharePoint Document Library without downloading on the Disk (Streaming approach).
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * from get_json_file
WITH(
DriveId=''b!0zqXLXXJh0uUMzl-JXAd9Ztngc-5utVDqRyD2lKpD2535-11HLQTR5z4hOzmA7Q0''
, FileId=''root:/MyFolder/dump.json.zip:''
, Filter=''$.store.books[*]'' --or just blank (see help file for more filter examples)
, FileCompressionType=''Zip'' --None, GZip, Zip
)';
EXEC (@MyQuery) AT [LINKED_SERVER_TO_SHAREPOINT_ONLINE_IN_DATA_GATEWAY];