Read JSON file (streaming, no download)
Gets JSON file content without downloading to disk (streaming). Supply DriveId and FileId (path must end with colon). For compressed files set FileCompressionType to GZip or Zip.
SELECT * from get_json_file
WITH(
DriveId='b!0zqXLXXJh0uUMzl-JXAd9Ztngc-5utVDqRyD2lKpD2535-11HLQTR5z4hOzmA7Q0'
, FileId='root:/myfolder/dump.json:' --Path must end with colon
--, FileId='01N3NI7YRUO2UHV2TUMBGJ4H4QQMWCG6DA'
--to read compressed file use below way
--, FileId='root:/myfolder/dump.json.gz:' --Path must end with colon
--, FileCompressionType='GZip' --None, GZip, Zip
, Filter='$.store.books[*]' --or just blank (see help file for more filter examples)
)
--SELECT * FROM get_json_file WITH(FileId='01N3NI7YQJMKXUWUAQGJEJJJNSGVT7QSJ3')
--SELECT * FROM get_json_file WITH(FileId='root:/dump.json:') --Path must end with colon
--SELECT * FROM get_json_file WITH(FileId='root:/Documents/dump.json:') --Path must end with colon
--SELECT * FROM get_json_file WITH(FileId='root:/Documents/SubFolder/dump.json:') --Path must end with colon