I am trying to load a parquet file into Azure SQL Database based on an example here on SO. However, I'm getting a syntax error. I don't see much documentation on Microsoft website or enough information on Google. So, seeking help from experts here. FYI - I have already created the DATA_SOURCE.
Creating External Data Source:
CREATE EXTERNAL DATA SOURCE [my_azure_blob_storage]
WITH (
LOCATION = N'abfss://xxxxxxx.dfs.core.windows.net',
CREDENTIAL = [myblobStorage] ,
TYPE = BLOB_STORAGE
);
Doing BULK INSERT:
BULK INSERT [dbo].[Employees]
FROM 'gold/employees'
WITH
(
DATA_SOURCE = 'my_azure_blob_storage',
FORMAT = 'PARQUET',
FIRSTROW = 2
);
And the error I am getting is:
Msg 102, Level 15, State 1, Line 6 Incorrect syntax near 'FORMAT'.
1条答案
按热度按时间kmpatx3s1#
Currently the only FORMAT supported in BULK INSERT or OPENROWSET is CSV.
You can use Azure Data Factory or Spark to bulk load SQL Server from a parquet file, or to prepare a CSV file for BULK INSERT or OPENROWSET.
UPDATE: Support for Delta and Parquet have ben added to OPENROWSET SQL Server 2022.