Loading data from multiple JSON files to SQL Server Table | SSIS | SQL Server Integration Services

preview_player
Показать описание
In this video, we will see how can we load data from multiple JSON files to SQL Server Table | SSIS | SQL Server Integration Services.

Query/Expression to Load JSON File================================
"Declare @EmployeesJSON varchar(max)
SELECT @EmployeesJSON = BulkColumn
FROM OPENROWSET (BULK '"+ @[User::FullJsonFilePath] +"', SINGLE_CLOB) import
--INSERT INTO dbo.EmployeesJSON
SELECT *
WITH
(
[id] int,
[first_name] varchar(50),
[last_name] varchar(50),
[email] varchar(50),
[gender] nvarchar(30),
[city] varchar(100),
[country] varchar(100),
[JsonFileName] varchar(50)
)"
CREATE TABLE========================================
CREATE TABLE [dbo].[EmployeesJSON]
(
[id] int,
[first_name] varchar(50),
[last_name] varchar(50),
[email] varchar(50),
[gender] nvarchar(30),
[city] varchar(100),
[country] varchar(100),
[JsonFileName] varchar(50)
)

You can find me on
Рекомендации по теме
Комментарии
Автор

I get below error -
Msg 4861, Level 16, State 1, Line 2
Cannot bulk load because the file "C:\Sushanthi\json" could not be opened. Operating system error code 5(Access is denied.).

sushanthireddy
Автор

I don't have permission to use the bulk load Statement. Any alternate for this. Please reply

Sathishkumar-zdco
Автор

Could you please make the video on XML with SQL?

vinitpatel
join shbcf.ru