I am in the process of building a grocery list app with Azure.
Currently, I have an azure function that writes json files to blob storage. Here is what my current blob storage looks like: When Azure data factory copies over the data to my SQL DB, this is what it looks like:
Here is the code that I am using to create my table:
-- Create a new table called 'groceryitems' in schema 'grocerylistapp'
-- Drop the table if it already exists
IF OBJECT_ID('grocerylistapp.groceryitems', 'U') IS NOT NULL
DROP TABLE grocerylistapp.groceryitems
GO
CREATE SCHEMA grocerylistapp
GO
-- Create the table in the specified schema
CREATE TABLE grocerylistapp.groceryitems
(
id INT IDENTITY(1,1), -- Primary Key column
epoch DATE,
[name] VARCHAR(50),
PRIMARY KEY CLUSTERED([id] ASC)
-- Specify more columns here
);
GO
1
Oddly enough, when I originally did this with Data Warehouse / Synapse, I didn't get this issue, so I am assuming it is something to do particularly with SQL DB.
I also want to add that it randomly decides to distort one row, if I had 3,4, or 5 items in blob storage, it would pick one row and distort it as shown in the screenshot. It is not always the same item.
Thank you.
Firstly, make sure you have chosen the json
format file as Soure dataset.
Here're the steps I tested, and it works well.
Source dataset(json format) from Blob storage:
Import the cchema of the source dataset:
Sink dataset settings:
Mapping settings:
Run the pipeline:
Check the data in table grocerylistapp.groceryitems
:
Hope this helps.
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.