How to Load Multiple Json Files to SQL Server Table with File Name In SSIS - SSIS Tutorial 2021

preview_player
Показать описание
How to Load Multiple JSON File to SQL Server Table with file name in SSIS - SSIS Tutorial 2021- SQL Server
In this video you are going to learn how to load Multiple JSON file to SQL Server Table With File Name in SSIS, in this video first of all i will show the JSON file which i have created online just for the demo purpose, in this file we have ID, First Name, Last Name, Email, Gender and IP Address, in this video you are going to learn how to load Multiple JSON to SQL Server Table With File Name in SSIS, i have load the data by using Visual Studio Command. and add the Multiple JSON File In SQL Server Table, also i have write down the used command for your convenience.

"Declare @JSON varchar(max)
SELECT @JSON=BulkColumn
FROM OPENROWSET (BULK '"+ @[User :: FilePath] +"', SINGLE_CLOB) import
insert into dbo.SSISJson
SELECT *, '"+ @[User::FilePath] +"' as filename FROM OPENJSON @JSON)
WITH
(
[ID] INT,
[first_name] varchar(100),
[last_name] varchar(100),
[email] varchar(100),
[gender] varchar(20),
[ip_address] varchar(10)
)"

#MultipleJasonFileToSqlServer #SSISTutorial
Рекомендации по теме
Комментарии
Автор

Thank you so much! Such a time saver, been stuck on this for a couple days :)

PopAda
Автор

Thank you for this video. One imp question, how do we handle if the target table has columns with different names.

getdilip
Автор

Excellent - though one important question, what do you do if the JSON file has sub trees and only want that? I want what is in: _embedded.assets ?
Example: FROM OPENROWSET (BULK 'D:\Customer\USB\MY_PROD\output\json\assets_page1.json', SINGLE_CLOB) as j
CROSS APPLY OPENJSON(BulkColumn, '$._embedded.assets')

flyboy
Автор

Excellent... thank you very very much...!!!

edsonrueda
visit shbcf.ru