File tree Expand file tree Collapse file tree
samples/features/sql-bulk-load/load-from-azure-blob-storage Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333CREATE TABLE dbo .Product (
3434 Name nvarchar (50 ) NOT NULL ,
3535 Color nvarchar (15 ) NULL ,
36- Size nvarchar (5 ) NULL ,
3736 Price money NOT NULL ,
37+ Size nvarchar (5 ) NULL ,
3838 Quantity int NULL ,
3939 Data nvarchar (4000 ) NULL ,
4040 Tags nvarchar (4000 ) NULL ,
@@ -51,6 +51,15 @@ BULK INSERT Product
5151FROM ' data/product.csv'
5252WITH ( DATA_SOURCE = ' MyAzureBlobStorage' ,
5353 FORMAT = ' CSV' , CODEPAGE = 65001 , -- UTF-8 encoding
54+ FIRSTROW = 2 ,
55+ TABLOCK );
56+
57+ -- INSERT file exported using bcp.exe into Product table
58+ BULK INSERT Product
59+ FROM ' data/product.bcp'
60+ WITH ( DATA_SOURCE = ' MyAzureBlobStorage' ,
61+ FORMATFILE = ' data/product.fmt' ,
62+ FORMATFILE_DATA_SOURCE = ' MyAzureBlobStorage' ,
5463 TABLOCK );
5564
5665-- Read rows from product.dat file using format file and insert it into Product table
You can’t perform that action at this time.
0 commit comments