The script i have used to import the data is
CREATE DATABASE SCOPED CREDENTIAL MyAzureBlobStorageCredential
WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
SECRET = 'SAS Token';
CREATE EXTERNAL DATA SOURCE MyAzureBlobStorage
WITH ( TYPE = BLOB_STORAGE,
LOCATION = 'Location',
CREDENTIAL= MyAzureBlobStorageCredential);
SELECT *
FROM OPENROWSET(BULK 'generated.json', DATA_SOURCE = 'MyAzureBlobStorage',
FORMATFILE='product.fmt', FORMATFILE_DATA_SOURCE = 'MyAzureBlobStorage') as data
facing the error like
![118230-image.png]
I knew i was doing something wrong in the query but i don't get it .can someone please help me on this.
And also i am confused about how to write the format file for the table. Any leads will be appreciated
MY format table script
12.0
4
1 SQLCHAR 0 50 '","' 1 Name SQL_Latin1_General_CP1_CI_AS
2 SQLCHAR 0 50 '","' 2 Gender SQL_Latin1_General_CP1_CI_AS
3 SQLCHAR 0 50 '","' 3 Company SQL_Latin1_General_CP1_CI_AS
4 SQLCHAR 0 50 "\t" 4 Email SQL_Latin1_General_CP1_CI_AS
Thanks in advance..!!
[1]: /answers/storage/attachments/118230-image.png




