Invoking REST API through SQL Stored Proc

436 Views Asked by At

We are working with Azure Data Factory and there is this pipeline in which I am trying to check the response of an API which reports a pipeline status. If it returns 'InProgress', I want to wait for some time before doing the same thing until the status is either 'Succeeded' or 'Failed'. I can easily achieve this in ADF but we are being asked to reduce the pipeline cost to as low as possible. I have done some research and found that implementing a wait functionality in SP compared to the Wait-Until construct in ADF is significantly cheaper (Stored Procedure activity being an external activity). And thus, I am interested to see how to achieve this in stored proc.

1

There are 1 best solutions below

2
Nandan On

You can leverage Azure SQL Database External REST Endpoints Integration My blog : https://datasharkx.wordpress.com/2022/12/02/event-trigger-azure-data-factory-synapse-pipeline-via-azure-sql-database/ wherein directly access the API via Azure SQL database within an SP.

My sample blog for some other use case: https://datasharkx.wordpress.com/2022/12/02/event-trigger-azure-data-factory-synapse-pipeline-via-azure-sql-database/