0

I'm attempting to bulk load json files, along with their filenames and paths into a synapse analytics dedicated sql table but I'm just stumped on how to accomplish it. I can load the json files solo without a problem, but I really need the additional values as well.

This is what I'm trying but it doesn't work:

Copy INTO dbo.PolicyStagingJsonOnly 
SELECT  jsonContent,
        [result].filename() as fn,
        [result].filepath() as fp
FROM
    OPENROWSET(
        BULK 'https://datalakexxxx.blob.core.windows.net/staging/policy/*.json',
        FORMAT = 'CSV',
        FIELDQUOTE = '0x0b',
        FIELDTERMINATOR ='0x0b',
        rowterminator = '0x0c'
    )
    WITH (
        jsonContent varchar(MAX)
    ) AS [result]
brad
  • 605
  • 2
  • 7
  • 18

0 Answers0