使用参数从Logic App触发Azure数据工厂管道 [英] Trigger Azure Data Factory Pipeline from Logic App w/ Parameter

查看:90
本文介绍了使用参数从Logic App触发Azure数据工厂管道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我作为序言,我是Logic Apps和Data Factory的菜鸟.无论如何,我目前正在进行集成,其中一部分是我需要从Logic Apps触发Data Factory中的管道.我已经成功地做到了,我似乎无法弄清的 one 部分是如何将参数传递给我的管道.我曾尝试在参数"和参数"下更改JSON. 触发"部分,但到目前为止没有任何可点击的内容.管道最终执行,但仅使用默认参数.

Let me preface that I'm a noob to Logic Apps and Data Factory. Anyways, I'm currently working on an integration and one part of it is that I need to trigger a pipeline in Data Factory from Logic Apps. I've successfully done that, the one part I can't seem to figure out is how to pass parameters to my pipeline. I've tried altering the JSON under both the "parameters" & "triggers" sections but haven't gotten anything to click so far. The pipeline ends up executing, but only with the default parameters.

有人在此方面取得任何成功吗?感谢您的帮助.

Has anybody had any success in doing this yet? Any help is appreciated.

推荐答案

您可以使用逻辑应用程序的创建管道运行"操作的body属性将参数传递给管道.与往常一样,请小心,因为此操作不仅在预览中,而且在任何MS文档中也找不到此解决方案.我只是根据其他类似动作的格式进行了有根据的猜测.

You can use the body property of the logic app's "Create a pipeline run" action to pass parameters to the pipeline. As always, be careful because not only is this action in preview but I also couldn't find this solution in any MS documentation. I just made an educated guess based on how other similar actions are formatted.

示例:

"Run_my_pipeline": {
  "inputs": {
    "host": {
      "connection": {
        "name": "@parameters('$connections')['azuredatafactory']['connectionId']"
      }
    },
    "method": "post",
    "body": {
      "param1": "myParamValue",
      "param2": "myParamValue"
    },
    "path": "...",
    "queries": {
      "x-ms-api-version": "2017-09-01-preview"
    },
    "authentication": "@parameters('$authentication')"
  }
}

这篇关于使用参数从Logic App触发Azure数据工厂管道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆