Read the data from Rest API (JSON) by using REST Connector and Write to Azure SQL DB in ADF

 Issue: Read the data from Rest API (JSON) by using REST Connector and Write to Azure SQL DB in Azure Data Factory.

In this article, we are going to learn how to read the data from Rest API .Json format by using Rest Connector and write it to Azure SQL Database in Azure Data Factory, let's start our demonstration, we are using a sample data from a free website, as they are providing free data to use in the demo so copy the URL.



Open the Azure data factory studio and go to the author and click on the pipeline then select the new pipeline.



Find the copy data activity and drag it into the working window then go to the source tab and click on + New button to create the new source dataset from where we read the data.



Fine and select the Rest Connector and click on Continue.



Then it will ask for the linked service, click on the + New button to create new linked service and click on ok.



Now provide the base URL which we copied from the website, then select the authentication type, in my case I am using a free sample data I will select anonymous, then test the connection and click on create.


Select the request method, in this scenario we are getting the data so we will select ''Get''.



Click on the sink tab and then click on the + New button to create a new sink dataset where we have to write the data.



Find and select the Azure SQL Database and then click on continue.



Then it will ask you for the linked service, click on the  + New button to create a new linked service for sink dataset.


Select the Azure Subscription, then provide the server name, then provide the database name, Select the authentication type, provide the username and password, test the connection and then click on create.





Click on the auto-create table and click on Open to provide the file name.



Provide the Schema and file name.




Then go to the mapping tab and click on the collection reference and then back to our pipeline and click on debug.








Once debug process will be completed go to the SQL Server Management Studio and find the file in the database and also you can view the data.






Video Demo: Read the data from Rest API (JSON) by using REST Connector and Write to Azure SQL DB in ADF




No comments:

Post a Comment