'the values are not reflected in the database after insertion azure logic app

I try to copy data from file in blob storage into sql server,i used azure logic app,all strep work fine but the value never insert into the table,how can i resole this issue Here is my workflow and the stored procedure

enter image description here

enter image description here

Queries that i used:

CREATE DATABASE SCOPED CREDENTIAL BlobCredential
WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
SECRET = 'sv=SAS_TOKEN_HERE'; i used the sas token without ?


CREATE EXTERNAL DATA SOURCE AzureBlob
WITH ( 
    TYPE       = BLOB_STORAGE,
    LOCATION   = 'link of my containers',
    CREDENTIAL = BlobCredential
);

CREATE TABLE Test (
    ID int,
    VALUE nvarchar(400)
)

CREATE OR ALTER PROCEDURE LoadDataintoAzureSQL2
AS
BEGIN
TRUNCATE table [dbo].[Test];
BULK INSERT [dbo].[Test]
FROM 'input.csv'
WITH ( 
    DATA_SOURCE = 'AzureBlob',
    FORMAT      = 'CSV',
    FIRSTROW    = 2
);
END


Solution 1:[1]

This is might be due to the Location that you have mentioned while the DATA SOURCE

CREATE EXTERNAL DATA SOURCE dataset
WITH ( 
    TYPE       = BLOB_STORAGE,
    LOCATION   = 'https://<STORAGE ACCOUNT NAME>.blob.core.windows.net/<YOUR CONTAINER NAME>',
    CREDENTIAL = Credentials
);

Inorder to get your credentials try giving your SAS SIGNATURE without '?' in the beginning.

CREATE DATABASE SCOPED CREDENTIAL Credentials
WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
SECRET = '<YOUR SAS without '?'>'

Here is the Stored Procedure that I used

CREATE OR ALTER PROCEDURE LoadDataintoAzureSQL2
AS
BEGIN
TRUNCATE table [dbo].[Products];
BULK INSERT [dbo].[Products]
FROM 'Products.csv'
WITH ( 
    DATA_SOURCE = 'dataset',
    FORMAT      = 'CSV',
    FIRSTROW    = 2
);
END

REFERENCES: Quick, easy and cheap way to automate data loading from CSV file into Azure SQL

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 SwethaKandikonda-MT