[英]Invoking REST API through SQL Stored Proc
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.我们正在使用 Azure 数据工厂,在这个管道中我试图检查报告管道状态的API的响应。 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.
我可以在 ADF 中轻松实现这一点,但我们被要求将管道成本降低到尽可能低的水平。 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).
我做了一些研究,发现与 ADF 中的 Wait-Until 构造相比,在 SP 中实现等待功能要便宜得多(存储过程活动是外部活动)。 And thus, I am interested to see how to achieve this in stored proc.
因此,我很想知道如何在存储过程中实现这一点。
You can leverage Azure SQL Database External REST Endpoints Integration 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.您可以直接利用 Azure SQL 数据库外部 REST 端点集成https://datasharkx.wordpress.com/2022/12/02/event-trigger-azure-data-factory-synapviase-ure-sql-pipeline-通过 SP 中的 Azure SQL 数据库访问 API。
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/一些其他用例的示例博客: https://datasharkx.wordpress.com/2022/12/02/event-trigger-azure-data-factory-synapse-pipeline-via-azure-sql-database/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.