无法在数据工厂中激活触发器作为CI / CD部署的一部分 [英] Unable to activate triggers in Data Factory as part of CI/CD deployment

查看:55
本文介绍了无法在数据工厂中激活触发器作为CI / CD部署的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过json模板部署多个Azure Data Factory管道以及链接服务和触发器。即使触发器具有"运行时间",属性为"已启动"在模板中,触发器始终部署在已停止的
状态中,必须手动激活。以下是json模板部分的示例,其中包含在指定存储帐户中创建新blob时激活的触发器:

I am deploying several Azure Data Factory pipelines along with linked services and triggers via json templates. Even though the trigger has the "runtime" property as "started" in the template, the triggers are always deployed in the stopped state and have to be activated manually. Here is an example of the section of the json template with a trigger that is activated when a new blob is created within the specified storage account:


        {
            "name": "[concat(parameters('factoryName'), '/fileTrigger')]",
            "type": "Microsoft.DataFactory/factories/triggers",
            "apiVersion": "2018-06-01",
            "properties": {
                "annotations": [],
                "runtimeState": "Started",
                "pipelines": [
                    {
                        "pipelineReference": {
                            "referenceName": "decrypt-pipeline",
                            "type": "PipelineReference"
                        },
                        "parameters": {
                            "folderPath": "[parameters('fileTrigger_properties_decrypt-pipeline_parameters_folderPath')]",
                            "fileName": "[parameters('fileTrigger_properties_decrypt-pipeline_parameters_fileName')]"
                        }
                    }
                ],
                "type": "BlobEventsTrigger",
                "typeProperties": {
                    "blobPathBeginsWith": "[concat('/', parameters('storageaccountName'), parameters('rawCntSuffix'), '/')]",
                    "scope": "[variables('fileTrigger_properties_typeProperties_scope')]",
                    "events": [
                        "Microsoft.Storage.BlobCreated"
                    ]
                }
            },
            "dependsOn": [
                "[concat(variables('factoryId'), '/pipelines/decrypt-pipeline')]"
            ]
        }



推荐答案

此处当我们部署触发器时,它会被"已停止"创建。国家。我们将不得不使用powershell来激活触发器,你选择使用PS来做到这一点。 

At this time when we deploy a trigger it gets created with the "Stopped" state . We will have to work around with the powershell to activate the trigger , you choose to use PS to do that . 


GetAllTriggers = Get-AzureRmDataFactoryV2Trigger -DataFactoryName
GetAllTriggers = Get-AzureRmDataFactoryV2Trigger -DataFactoryName


datafatoryName -ResourceGroupName
datafatoryName -ResourceGroupName


这篇关于无法在数据工厂中激活触发器作为CI / CD部署的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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