I keep getting this error ( Referenced external data source "MyAzureBlobStorage" not found. ) when loading csv from blob to Azure SQL. I am following this example and I set my blob to be public but the following just does not work:
CREATE EXTERNAL DATA SOURCE MyAzureBlobStorage
WITH ( TYPE = BLOB_STORAGE,
LOCATION = 'https://test.blob.core.windows.net/test'
);
BULK INSERT SubscriberQueue
FROM 'inputs.csv'
WITH (DATA_SOURCE = 'MyAzureBlobStorage', FORMAT='CSV');
Any ideas what I am missing here?
If you want to bulk insert from Azure blob, please refer to following script
1,Peter,Jackson,pjackson@hotmail.com
2,Jason,Smith,jsmith@gmail.com
3,Joe,Raasi,jraasi@hotmail.com
create table listcustomer
(id int,
firstname varchar(60),
lastname varchar(60),
email varchar(60))
Go
CREATE EXTERNAL DATA SOURCE MyAzureBlobStorage
WITH ( TYPE = BLOB_STORAGE,
LOCATION = 'https://****.blob.core.windows.net/test'
);
Go
BULK INSERT listcustomer
FROM 'mycustomers.csv'
WITH (DATA_SOURCE = 'MyAzureBlobStorage', FORMAT='CSV');
Go
select * from listcustomer;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.