Skip to content

Commit 5cc4bb3

Browse files
Merge pull request #192 from JocaPC/master
Updated load from azure blob storage example
2 parents 94af76c + 2c4eb51 commit 5cc4bb3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

samples/features/sql-bulk-load/load-from-azure-blob-storage/LoadFromAzureBlobStorage.sql

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ GO
3333
CREATE 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
5151
FROM 'data/product.csv'
5252
WITH ( 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

0 commit comments

Comments
 (0)