File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
samples/features/sql-bulk-load/load-from-azure-blob-storage Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 33
33
CREATE TABLE dbo .Product (
34
34
Name nvarchar (50 ) NOT NULL ,
35
35
Color nvarchar (15 ) NULL ,
36
- Size nvarchar (5 ) NULL ,
37
36
Price money NOT NULL ,
37
+ Size nvarchar (5 ) NULL ,
38
38
Quantity int NULL ,
39
39
Data nvarchar (4000 ) NULL ,
40
40
Tags nvarchar (4000 ) NULL ,
@@ -51,6 +51,15 @@ BULK INSERT Product
51
51
FROM ' data/product.csv'
52
52
WITH ( DATA_SOURCE = ' MyAzureBlobStorage' ,
53
53
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' ,
54
63
TABLOCK );
55
64
56
65
-- 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