diff --git a/samples/demos/BelgradeProductCatalogDemo/sql-scripts/7. xtp.sql b/samples/demos/BelgradeProductCatalogDemo/sql-scripts/7. xtp.sql new file mode 100644 index 00000000..720dbfe0 --- /dev/null +++ b/samples/demos/BelgradeProductCatalogDemo/sql-scripts/7. xtp.sql @@ -0,0 +1,79 @@ +DROP TABLE IF EXISTS xtp.Product; +GO +DROP SCHEMA IF EXISTS xtp; +GO + +CREATE SCHEMA xtp; +GO + +CREATE TABLE xtp.Product ( + ProductID int IDENTITY PRIMARY KEY NONCLUSTERED, + Name nvarchar(50) NOT NULL, + Color nvarchar(15) NULL, + Size nvarchar(5) NULL, + Price money NOT NULL, + Quantity int NULL, + CompanyID int, + Data nvarchar(4000), + Tags nvarchar(4000), + DateModified datetime2(0) NOT NULL DEFAULT (GETUTCDATE()) +) WITH (MEMORY_OPTIMIZED=ON) +GO + +DECLARE @products NVARCHAR(MAX) = +N'[{"ProductID":15,"Name":"Adjustable Race","Color":"Magenta","Size":"62","Price":100.0000,"Quantity":75,"CompanyID":1,"Data":{"Type":"Part","MadeIn":"China"},"DateModified":"2016-02-11T21:27:32"},{"ProductID":16,"Name":"Bearing Ball","Color":"Magenta","Size":"62","Price":15.9900,"Quantity":90,"CompanyID":2,"Data":{"ManufacturingCost":11.672700,"Type":"Part","MadeIn":"China"},"Tags":["promo"],"DateModified":"2016-02-11T21:27:32"},{"ProductID":17,"Name":"BB Ball Bearing","Color":"Magenta","Size":"62","Price":28.9900,"Quantity":80,"CompanyID":3,"Data":{"ManufacturingCost":21.162700,"Type":"Part","MadeIn":"China"},"DateModified":"2016-02-11T21:27:32"},{"ProductID":18,"Name":"Blade","Color":"Magenta","Size":"62","Price":18.0000,"Quantity":45,"CompanyID":4,"Data":{},"Tags":["new"],"DateModified":"2016-02-11T21:27:32"},{"ProductID":19,"Name":"Sport-100 Helmet, Red","Color":"Red","Size":"72","Price":41.9900,"Quantity":38,"CompanyID":3,"Data":{"ManufacturingCost":30.652700,"Type":"Еquipment","MadeIn":"China"},"Tags":["promo"],"DateModified":"2016-02-11T21:27:32"},{"ProductID":20,"Name":"Sport-100 Helmet, Black","Color":"Black","Size":"72","Price":31.4900,"Quantity":60,"CompanyID":1,"Data":{"ManufacturingCost":22.987700,"Type":"Еquipment","MadeIn":"China"},"Tags":["new","promo"],"DateModified":"2016-02-11T21:27:32"},{"ProductID":21,"Name":"Mountain Bike Socks, M","Color":"White","Size":"M","Price":560.9900,"Quantity":30,"CompanyID":2,"Data":{"Type":"Clothes"},"Tags":["sales","promo"],"DateModified":"2016-02-11T21:27:32"},{"ProductID":22,"Name":"Mountain Bike Socks, L","Color":"White","Size":"L","Price":120.9900,"Quantity":20,"CompanyID":3,"Data":{"ManufacturingCost":88.322700,"Type":"Clothes"},"Tags":["sales","promo"],"DateModified":"2016-02-11T21:27:32"},{"ProductID":23,"Name":"Long-Sleeve Logo Jersey, XL","Color":"Multi","Size":"XL","Price":44.9900,"Quantity":60,"CompanyID":4,"Data":{"ManufacturingCost":32.842700,"Type":"Clothes"},"Tags":["sales","promo"],"DateModified":"2016-02-11T21:27:32"},{"ProductID":24,"Name":"Road-650 Black, 52","Color":"Black","Size":"52","Price":704.6900,"Quantity":70,"CompanyID":5,"Data":{"Type":"Bike","MadeIn":"UK"},"DateModified":"2016-02-11T21:27:32"},{"ProductID":25,"Name":"Mountain-100 Silver, 38","Color":"Silver","Size":"38","Price":359.9900,"Quantity":45,"CompanyID":1,"Data":{"ManufacturingCost":262.792700,"Type":"Bike","MadeIn":"UK"},"Tags":["promo"],"DateModified":"2016-02-11T21:27:32"},{"ProductID":26,"Name":"Road-250 Black, 48","Color":"Black","Size":"48","Price":299.0200,"Quantity":25,"CompanyID":2,"Data":{"ManufacturingCost":218.284600,"Type":"Bike","MadeIn":"UK"},"Tags":["new","promo"],"DateModified":"2016-02-11T21:27:32"},{"ProductID":27,"Name":"ML Bottom Bracket","Price":101.2400,"Quantity":50,"CompanyID":3,"Data":{"Type":"Part","MadeIn":"China"},"DateModified":"2016-02-11T21:27:32"},{"ProductID":28,"Name":"HL Bottom Bracket","Price":121.4900,"Quantity":65,"CompanyID":4,"Data":{"ManufacturingCost":88.687700,"Type":"Part","MadeIn":"China"},"DateModified":"2016-02-11T21:27:32"}]' +INSERT INTO xtp.Product (ProductID, Name, Color, Size, Price, Quantity, CompanyID, Data, Tags, DateModified) +SELECT ProductID, Name, Color, Size, Price, Quantity, CompanyID, Data, Tags, DateModified +FROM OPENJSON (@products) WITH( + ProductID int,Name nvarchar(50),Color nvarchar(15),Size nvarchar(5),Price money,Quantity int,CompanyID int, + Data nvarchar(MAX) AS JSON,Tags nvarchar(MAX) AS JSON, + DateModified datetime2(0) +) +GO + +DROP PROCEDURE IF EXISTS xtp.InsertProductFromJson +GO +CREATE PROCEDURE xtp.InsertProductFromJson(@ProductJson NVARCHAR(MAX)) +WITH SCHEMABINDING, NATIVE_COMPILATION +AS BEGIN + ATOMIC WITH (TRANSACTION ISOLATION LEVEL = SNAPSHOT, LANGUAGE = N'us_english') + INSERT INTO xtp.Product(Name,Color,Size,Price,Quantity,CompanyID,Data,Tags) + OUTPUT INSERTED.ProductID + SELECT Name,Color,Size,Price,Quantity,CompanyID,Data,Tags + FROM OPENJSON(@ProductJson) + WITH ( Name nvarchar(100) N'strict $."Name"', + Color nvarchar(30), + Size nvarchar(10), + Price money N'strict $."Price"', + Quantity int, + CompanyID int, + Data nvarchar(max) AS JSON, + Tags nvarchar(max) AS JSON) as json +END +GO + +DROP PROCEDURE IF EXISTS xtp.UpdateProductFromJson +GO +CREATE PROCEDURE xtp.UpdateProductFromJson(@ProductID int, @ProductJson NVARCHAR(MAX)) +AS BEGIN + + UPDATE xtp.Product SET + Name = json.Name, + Color = json.Color, + Size = json.Size, + Price = json.Price, + Quantity = json.Quantity, + Data = ISNULL(json.Data, dbo.Product.Data), + Tags = ISNULL(json.Tags,dbo.Product.Tags) + FROM OPENJSON(@ProductJson) + WITH ( Name nvarchar(100) N'strict $."Name"', + Color nvarchar(30), + Size nvarchar(10), + Price money N'strict $."Price"', + Quantity int, + Data nvarchar(max) AS JSON, + Tags nvarchar(max) AS JSON) as json + WHERE xtp.Product.ProductID = @ProductID + +END +GO diff --git a/samples/demos/BelgradeProductCatalogDemo/sql-scripts/A3 setup-temporal-3-part-name.sql b/samples/demos/BelgradeProductCatalogDemo/sql-scripts/A3 setup-temporal-3-part-name.sql new file mode 100644 index 00000000..1fb001a9 --- /dev/null +++ b/samples/demos/BelgradeProductCatalogDemo/sql-scripts/A3 setup-temporal-3-part-name.sql @@ -0,0 +1,52 @@ +DROP VIEW IF EXISTS History.Product +GO +DROP SCHEMA IF EXISTS History +GO +CREATE SCHEMA History +GO + +CREATE VIEW History.Product +AS SELECT * FROM ProductCatalog.History.Product +GO + +drop function if exists dbo.diff_Product +go +create function dbo.diff_Product (@id int, @date datetime2(0)) +returns table +as +return ( + select * from ProductCatalog.dbo.diff_Product (@id, @date) +) +GO + + +drop procedure if exists dbo.GetProducts +go +create procedure dbo.GetProducts as +begin + begin tran + EXEC ProductCatalog.dbo.GetProducts + commit +end +GO + +drop procedure if exists dbo.GetProductsAsOf +go +create procedure dbo.GetProductsAsOf (@date datetime2) as +begin + begin tran + EXEC ProductCatalog.dbo.GetProductsAsOf @date + commit +end +GO + +GO +drop procedure if exists dbo.RestoreProduct +GO +create procedure dbo.RestoreProduct (@productid int, @date datetime2) as +begin + begin tran + EXEC ProductCatalog.dbo.RestoreProduct @productid, @date + commit +end +GO \ No newline at end of file diff --git a/samples/features/json/scripts/channel9-json-intro.sql b/samples/features/json/scripts/channel9-json-intro.sql new file mode 100644 index 00000000..98848d19 --- /dev/null +++ b/samples/features/json/scripts/channel9-json-intro.sql @@ -0,0 +1,199 @@ +declare @json nvarchar(max) = +N'{ + "Name": "Vlade", + "Surname": "Divac", + "Born": { "DoB":"1968-03-02","Town":"Prijepolje", "Country": "Serbia"}, + "NBA Stat": { "pts":13398, "ppg": 11.8, "rebounds": 9326, "rpg": 8.2, "blocks": 1631, "bpg": 1.4}, + "Teams": ["Los Angeles Lakers","Sacramento Kings","Partizan"], + "Career": [ + {"team":"Sloga", "period":{"start":1983, "end":1986}}, + {"team":"Partizan", "period":{"start":1986, "end":1989}}, + {"team":"Los Angeles Lakers","gp":540, "gs":450, "period":{"start":1989, "end":1996}}, + {"team":"Charlotte Hornets","gp":145, "gs":121,"period":{"start":1996, "end":1998}}, + {"team":"Sacramento Kings","gp":454, "gs":453,"period":{"start":1998, "end":2004}}, + {"team":"Los Angeles Lakers", "gp":15, "gs":0,"period":{"start":2004, "end":2005}}], + "Bio":"Vlade Divac (Serbian Cyrillic: Владе Дивац) (born February 3, 1968) is a retired Serbian professional basketball player and is currently the vice president of basketball operations and general manager of the Sacramento Kings.[1]. Divac spent most of his career in the National Basketball Association (NBA). At 7 ft 1 in, he played center and was known for his passing skills. Divac was among the first group of European basketball players to transfer to the NBA in the late 1980s and was named one of the 50 Greatest Euroleague Contributors.[2] Divac is one of seven players in NBA history to record 13,000 points, 9,000 rebounds, 3,000 assists and 1,500 blocked shots, along with Kareem Abdul-Jabbar, Tim Duncan, Shaquille O''Neal, Kevin Garnett, Pau Gasol and Hakeem Olajuwon.[3][n 1] Divac was also the first player born and trained outside the United States to play in over 1,000 games in the NBA. On August 20, 2010, Divac was inducted into the FIBA Hall of Fame in recognition of his play in international competition.[4] Aside from being noticed for his basketball abilities, Divac is also known as a humanitarian, helping children in his native country of Serbia, and in Africa.[5] In October 2008 Divac was appointed a government adviser in Serbia for humanitarian issues.[6] In February 2009 he was elected President of the Serbian Olympic Committee for a 4-year term.[7] and re-elected in November 2012,[8] Divac received an honor from the World Sports Humanitarian Hall of Fame.[9], In summer 1986, at 18, right after signing for KK Partizan, Divac debuted for the senior Yugoslavia national basketball team at the 1986 FIBA World Championship in Madrid, on invitation by the head coach Krešimir Ćosić. However, the excellent rookie''s performance was spoiled by the event in the semi-finals against Soviet Union. Forty-five seconds before the end, Yugoslavia had a comfortable lead of 9 points, but Soviets scored two three-pointers within a few seconds and cut the difference to 3 points. Yugoslavia tried to hold the ball for the remaining time, opting to continue the play with throw-ins instead of free throws following fouls, but with only 14 seconds left, Divac committed a double dribble, the Soviets were awarded the ball, and tied the score with another three-pointer. In the overtime, the Soviets easily prevailed against the shocked Yugoslavs, who had to be content with the bronze.[10] The next year, Divac participated in the team that took the gold at the FIBA Junior World Championship (since split into separate under-19 and under-21 events) in Bormio, Italy. That event launched the young generation of Yugoslavian basketballers, also featuring stars like Rađa and Kukoč, regarded as likely the best in history. Before the breakup of Yugoslavia, they would also take the titles at EuroBasket 1989 and the 1990 FIBA World Championship in Argentina,[10] where they were led by Dražen Petrović,[24] as well as the EuroBasket 1991 title, with Aleksandar Đorđević at point guard.[25], Drafted into the NBA in 1989 by the Los Angeles Lakers. He was also one of the first European players to have an impact in the league. Under the mentorship of Kareem Abdul-Jabbar and Magic Johnson, he improved his play and adapted to the American style of the game. Though he spoke no English, he quickly became popular among his teammates and the public for his charm and joviality. In the 1989–90 season, he was selected into the NBA All-Rookie Team.[10] Divac earned a reputation for flopping, or deceiving the officials into calling a foul on the other team by purposely falling to the floor upon contact with an opposing player.[12] Veteran NBA forward P. J. Brown claimed that Divac might have been the best of all time at flopping.[13] Divac freely admitted doing so, adding that he usually did it when he felt like the officials had missed some calls and owed him.[14] Ian Thomsen, a Sports Illustrated columnist, grouped Divac with fellow international players Anderson Varejão and Manu Ginóbili as the players who \"made [flopping] famous\", exaggerating contact on the court in a manner analogous to diving in FIFA games.[15]" + }' + +----> Check is @json properly formatted. +--SELECT ISJSON(@json) + + +----> Get a value from "Name" key +--SELECT JSON_VALUE(@json, '$.Name') + + +----> Get a value from "Born.Dob" path +-- SELECT JSON_VALUE(@json, '$.Born.DoB') + + +----> Get a value from "Career[2].period.start" path +--SELECT JSON_VALUE(@json, '$.Career[2].period.start') + + +----> Use "" if your key has non-alphanumeric characters. +--SELECT JSON_VALUE(@json, '$."NBA Stat".rebounds') + + +----> JSON path is case sensitive. The following query will return NULL: +--SELECT JSON_VALUE(@json, '$.name') + + +----> It will fail because $.Bio is bigger than 8K. +---- Without strict it would return null. +--SELECT JSON_VALUE(@json, 'strict $.Bio') + + +----> JSON_VALUE returns NULL if object is referenced +--SELECT JSON_VALUE(@json, '$.Born') + + +----> JSON_QUERY returns content of the object +--SELECT JSON_QUERY(@json, '$.Born') + + +----> JSON_QUERY will fail because $.Name is not an object. +--SELECT JSON_QUERY(@json, 'strict $.Name') + + +----> JSON_MODIFY updates JSON text with a new value on a specified path. +-- SELECT JSON_MODIFY(@json, '$.Bio', 'Vlade Divac is a retired professional NBA player...') + + +----> JSON_MODIFY may even append elements in an array. +-- SELECT JSON_MODIFY(@json, 'append $.Teams', 'Charlotte Hornets') + + + +----> Problem: this function will set text +---- "{\"DoB\":\"02/03/1968\",\"Town\":\"Prijepolje\"}" +---- instead of the object {"DoB":"02/03/1968","Town":"Prijepolje"} +-- SELECT JSON_MODIFY(@json, '$.Born', '{"DoB":"02/03/1968","Town":"Prijepolje"}') + + +----> Solution: use JSON_QUERY to "cast" JSON text to JSON +---- Input text will not be escaped. +-- SELECT JSON_MODIFY(@json, '$.Born', JSON_QUERY('{"DoB":"02/03/1968","Town":"Prijepolje"}')) + + + +----> Get all fields from a JSON: +--SELECT * FROM OPENJSON(@json) + + + +----> Get all Fields from an object in the specified path: +--SELECT * FROM OPENJSON(@json, '$.Born') + + +----> Get all elements from an array on the specified path: +--SELECT * FROM OPENJSON(@json, '$.Teams') + + + +--SELECT value FROM OPENJSON(@json) WHERE [key] = 'Bio' + + + +-- SELECT Bio FROM OPENJSON(@json) WITH (Bio nvarchar(MAX)) + + + +--SELECT * FROM OPENJSON(@json, '$.Born') +-- WITH (DoB datetime2, Town nvarchar(50), Country nvarchar(50)) + + + +--SELECT * FROM OPENJSON(@json, '$.Career') +-- WITH (team nvarchar(50), gp int, gs int) + + +----> Paths in column definitions enable you to parse nested JSON. +--SELECT * +--FROM OPENJSON(@json, '$.Career') +-- WITH (team nvarchar(50), gp int, gs int, +-- StartYear int '$.period.start', +-- EndYear int '$.period.end') + + +----> AS JSON option returns JSON nested object. +--SELECT * +--FROM OPENJSON(@json, '$.Career') +-- WITH (team nvarchar(50), gp int, gs int, +-- period nvarchar(max) AS JSON) + +----> Use CROSS APPLY OPENJSON to parse nested period array on the 2nd level. +--SELECT team, gp, gs, start, [end] +--FROM OPENJSON(@json, '$.Career') +-- WITH (team nvarchar(50), gp int, gs int, +-- period nvarchar(max) AS JSON) +-- CROSS APPLY OPENJSON (period) +-- WITH (start int, [end] int) + + + + +--select 1 as x, 2 as y, 3 as z, null as nothing +--for json path; + + + + +--select 1 as "point.x", 2 as "point.y", 3 as z +--for json path + + + +--with src(x,y) as (select 1 as x, 2 as y union select 3 as x, 4 as y) +--select * from src +--for json path; + + + + + +--select 1 as x, 2 as y, 3 as z +--for json path, without_array_wrapper; + + + + + +--with src(x,y) as (select 1 as x, 2 as y union select 3 as x, 4) +--select * from src +--for json path, without_array_wrapper + + + +--select 1 as x, 2 as y, 3 as z for json path, root('object') + + + + + + +--select 1 as x, 2 as y, 3 as z, +-- JSON_QUERY('{"x":1,"y":2}') as json +--for json path + + + + + +--select 1 as x, 2 as y, 3 as z, +-- (select 1 as x, 2 as y for json path) as json +--for json path + + + + + +--select 1 as x, 2 as y, 3 as z, +-- (select 1 as x, 2 as y for json path, without_array_wrapper) as NOjson +--for json path + + + +--select 1 as x, 2 as y, 3 as z, +-- JSON_QUERY((select 1 as x, 2 as y for json path, without_array_wrapper)) as json +--for json path \ No newline at end of file diff --git a/samples/features/sql-bulk-load/DimProducts.sql b/samples/features/sql-bulk-load/azure-dw-dotnet-sql-bulk-load/DimProducts.sql similarity index 100% rename from samples/features/sql-bulk-load/DimProducts.sql rename to samples/features/sql-bulk-load/azure-dw-dotnet-sql-bulk-load/DimProducts.sql diff --git a/samples/features/sql-bulk-load/Products.txt b/samples/features/sql-bulk-load/azure-dw-dotnet-sql-bulk-load/Products.txt similarity index 100% rename from samples/features/sql-bulk-load/Products.txt rename to samples/features/sql-bulk-load/azure-dw-dotnet-sql-bulk-load/Products.txt diff --git a/samples/features/sql-bulk-load/Program.cs b/samples/features/sql-bulk-load/azure-dw-dotnet-sql-bulk-load/Program.cs similarity index 100% rename from samples/features/sql-bulk-load/Program.cs rename to samples/features/sql-bulk-load/azure-dw-dotnet-sql-bulk-load/Program.cs diff --git a/samples/features/sql-bulk-load/README.md b/samples/features/sql-bulk-load/azure-dw-dotnet-sql-bulk-load/README.md similarity index 100% rename from samples/features/sql-bulk-load/README.md rename to samples/features/sql-bulk-load/azure-dw-dotnet-sql-bulk-load/README.md diff --git a/samples/features/sql-bulk-load/load-from-azure-blob-storage/LoadFromAzureBlobStorage.sql b/samples/features/sql-bulk-load/load-from-azure-blob-storage/LoadFromAzureBlobStorage.sql new file mode 100644 index 00000000..e25a2630 --- /dev/null +++ b/samples/features/sql-bulk-load/load-from-azure-blob-storage/LoadFromAzureBlobStorage.sql @@ -0,0 +1,70 @@ +/******************************************************************************** +* Note: You can export file and create format file using bcp out command: +* +*>bcp "SELECT Name, Color, Price, Size, Quantity, Data, Tags FROM Product" queryout product.dat -d ProductCatalog -T +* +********************************************************************************/ + +/******************************************************************************** +* SETUP * +********************************************************************************/ + +-- Create master key that will encrypt credentials +CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'some strong password'; + +-- Create credential with Azure Blob SAS +CREATE DATABASE SCOPED CREDENTIAL MyAzureBlobStorageCredential +WITH IDENTITY = 'SHARED ACCESS SIGNATURE', +SECRET = 'sv=2015-12-11&ss=b&srt=sco&sp=rwac&se=2017-02-01T00:55:34Z&st=2016-12-29T16:55:34Z&spr=https&sig=copyFromAzurePortal'; + +-- Create external data source with with the roow URL of the Blob storage Account and associated credential. +CREATE EXTERNAL DATA SOURCE MyAzureBlobStorage +WITH ( TYPE = BLOB_STORAGE, + LOCATION = 'https://myazureblobstorage.blob.core.windows.net', + CREDENTIAL= MyAzureBlobStorageCredential); + +/******************************************************************************** +* CREATE DESTINATION TABLE (if not exists) * +*********************************************************************************/ + +DROP TABLE IF EXISTS Product; +GO + +CREATE TABLE dbo.Product( + Name nvarchar(50) NOT NULL, + Color nvarchar(15) NULL, + Size nvarchar(5) NULL, + Price money NOT NULL, + Quantity int NULL, + Data nvarchar(4000) NULL, + Tags nvarchar(4000) NULL, + INDEX cci CLUSTERED COLUMNSTORE +) +GO + +/******************************************************************************** +* LOAD * +*********************************************************************************/ + +-- INSERT CSV file into Product table +BULK INSERT Product +FROM 'data/product.csv' +WITH ( DATA_SOURCE = 'MyAzureBlobStorage', + FORMAT='CSV', CODEPAGE = 65001, --UTF-8 encoding + TABLOCK); + +-- Read rows from product.dat file using format file and insert it into Product table +INSERT INTO Product WITH (TABLOCK) (Name, Color, Price, Size, Quantity, Data, Tags) +SELECT Name, Color, Price, Size, Quantity, Data, Tags +FROM OPENROWSET(BULK 'data/product.bcp', + DATA_SOURCE = 'MyAzureBlobStorage', + FORMATFILE='data/product.fmt', + FORMATFILE_DATA_SOURCE = 'MyAzureBlobStorage') as products; + +-- Query remote file +SELECT Color, count(*) +FROM OPENROWSET(BULK 'data/product.bcp', + DATA_SOURCE = 'MyAzureBlobStorage', + FORMATFILE='data/product.fmt', + FORMATFILE_DATA_SOURCE = 'MyAzureBlobStorage') as data +GROUP BY Color; \ No newline at end of file diff --git a/samples/features/sql-bulk-load/load-from-azure-blob-storage/product.bcp b/samples/features/sql-bulk-load/load-from-azure-blob-storage/product.bcp new file mode 100644 index 00000000..5c59cf6c Binary files /dev/null and b/samples/features/sql-bulk-load/load-from-azure-blob-storage/product.bcp differ diff --git a/samples/features/sql-bulk-load/load-from-azure-blob-storage/product.csv b/samples/features/sql-bulk-load/load-from-azure-blob-storage/product.csv new file mode 100644 index 00000000..9df09ee0 --- /dev/null +++ b/samples/features/sql-bulk-load/load-from-azure-blob-storage/product.csv @@ -0,0 +1,15 @@ +Name,Color,Price,Size,Quantity,Data,Tags +Adjustable Race,Magenta,100,62,75,"{""Type"":""Part"",""MadeIn"":""China""}", +Bearing Ball,Magenta,15.99,62,90,"{""ManufacturingCost"":11.672700,""Type"":""Part"",""MadeIn"":""China""}","[""promo""]" +BB Ball Bearing,Magenta,28.99,62,80,"{""ManufacturingCost"":21.162700,""Type"":""Part"",""MadeIn"":""China""}", +Blade,Magenta,18,62,45,,"[""new""]" +"Sport-100 Helmet, Red",Red,41.99,72,38,"{""ManufacturingCost"":30.652700,""Type"":""Еquipment"",""MadeIn"":""China""}","[""promo""]" +"Sport-100 Helmet, Black",Black,31.49,72,60,"{""ManufacturingCost"":22.987700,""Type"":""Еquipment"",""MadeIn"":""China""}","[""new"",""promo""]" +"Mountain Bike Socks, M",White,560.99,M,30,"{""Type"":""Clothes""}","[""sales"",""promo""]" +"Mountain Bike Socks, L",White,120.99,L,20,"{""ManufacturingCost"":88.322700,""Type"":""Clothes""}","[""sales"",""promo""]" +"Long-Sleeve Logo Jersey, XL",Multi,44.99,XL,60,"{""ManufacturingCost"":32.842700,""Type"":""Clothes""}","[""sales"",""promo""]" +"Road-650 Black, 52",Black,704.69,52,70,"{""Type"":""Bike"",""MadeIn"":""UK""}", +"Mountain-100 Silver, 38",Silver,359.99,38,45,"{""ManufacturingCost"":262.792700,""Type"":""Bike"",""MadeIn"":""UK""}","[""promo""]" +"Road-250 Black, 48",Black,299.02,48,25,"{""ManufacturingCost"":218.284600,""Type"":""Bike"",""MadeIn"":""UK""}","[""new"",""promo""]" +ML Bottom Bracket,NULL,101.24,NULL,50,"{""Type"":""Part"",""MadeIn"":""China""}", +HL Bottom Bracket,NULL,121.49,NULL,65,"{""ManufacturingCost"":88.687700,""Type"":""Part"",""MadeIn"":""China""}", diff --git a/samples/features/sql-bulk-load/load-from-azure-blob-storage/product.fmt b/samples/features/sql-bulk-load/load-from-azure-blob-storage/product.fmt new file mode 100644 index 00000000..3a8f9acf --- /dev/null +++ b/samples/features/sql-bulk-load/load-from-azure-blob-storage/product.fmt @@ -0,0 +1,9 @@ +13.0 +7 +1 SQLNCHAR 2 100 "" 1 Name SQL_Latin1_General_CP1_CI_AS +2 SQLNCHAR 2 30 "" 2 Color SQL_Latin1_General_CP1_CI_AS +3 SQLMONEY 0 8 "" 3 Price "" +4 SQLNCHAR 2 10 "" 4 Size SQL_Latin1_General_CP1_CI_AS +5 SQLINT 1 4 "" 5 Quantity "" +6 SQLNCHAR 2 8000 "" 6 Data SQL_Latin1_General_CP1_CI_AS +7 SQLNCHAR 2 8000 "" 7 Tags SQL_Latin1_General_CP1_CI_AS