T-SQL has included support for JSON data since SQL Server 2016. For further information, please check the documentation page here.
Import text File having data in Json format and load into SQL server
Hi Team,
I need to created an import package in SSIS to load data from text file which is having content in json format and load into Sql server database.
Below is one sample record in text file :
{"apeId":"677ac547367456defgea42beb9bebc","apeName":"DISCOVERY STATION","id":"e1a3af5af654178a0ff5ffc01fd014a7","imageUrl":"http://172.16.6.9:8080/427/21e3698fd99ffb5c.jpg","lat":"25.038544","lng":"52.146149","monitorTask":"Traffic","resultTime":"2021-03-26 16:05:25","sceneImgUrl":"http://172.16.6.9:8080/427/21e3d99ffb5c.jpg","subType":"CAR","subjectId":"H66621","trackId":"329741647"}
I need to get only the value from this and load into sql, the key is my table column name.
Understand it can be done through script task.
Please assist me on code sample.
Thanks,
Isteyak Ahmad
2 answers
Sort by: Newest
-
-
ZoeHui-MSFT 33,126 Reputation points
2021-09-08T02:10:59.413+00:00 Hi @isteyak ahmad ,
Code writing is out of my ability.
I did some online research for you which you may take a reference to see if it is useful.
how-to-import-json-data-in-sql-server-using-mvc-5
importing-json-files-using-sql-server-integration-services
Regards,
Zoe
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Hot issues October