如何使用Azure CLI更新ADF计划时间?

huangapple go评论60阅读模式
英文:

How to update the ADF schedule time using the Azure CLI?

问题

这是我的触发器类型属性:

"type": "ScheduleTrigger",
"typeProperties": {
"recurrence": {
"frequency": "Day",
"interval": 1,
"startTime": "2023-07-07T05:28:00",
"timeZone": "W. Europe Standard Time",
"schedule": {
"minutes": [
10
],
"hours": [
16
]
}
}
}

我想通过 Azure CLI 将小时从 16 改为 18。我尝试了多个 update 语句,但无法成功。

英文:

This is my trigger typeProperties,

"type": "ScheduleTrigger",
        "typeProperties": {
            "recurrence": {
                "frequency": "Day",
                "interval": 1,
                "startTime": "2023-07-07T05:28:00",
                "timeZone": "W. Europe Standard Time",
                "schedule": {
                    "minutes": [
                        10
                    ],
                    "hours": [
                        16
                    ]
                }
            }
        }

I want to change the hours 16 to 18 through the azure cli. I tried the multiple update statement but I couldn't able to do so.

答案1

得分: 1

使用Azure CLI更新计划时间,您可以使用az datafactory trigger update命令,并使用**--set**参数指定要更新现有触发器的属性路径和值。

az datafactory trigger update --resource-group "资源组名称" --factory-name "数据工厂名称" --name "触发器名称" --set properties.recurrence.schedule.minutes=[29] --set properties.recurrence.schedule.hours=[29]

我的触发器的初始属性:

如何使用Azure CLI更新ADF计划时间?

执行CLI命令后:

如何使用Azure CLI更新ADF计划时间?

英文:

To update schedule time using the Azure CLI You can use az datafactory trigger update Azure CLI command with --set parameter specifying a property as path and value for updating an existing trigger.

az datafactory trigger update --resource-group "resourcegroup name" --factory-name "Datafactory name"  --name "Trigger name" --set properties.recurrence.schedule.minutes=[29]  --set properties.recurrence.schedule.hours=[29]

Initial properties of my trigger:

如何使用Azure CLI更新ADF计划时间?

After executing CLI command:

如何使用Azure CLI更新ADF计划时间?

答案2

得分: 0

嗨@pratik,一切都很顺利,但是当我使用相同的方法来更新weekDays的值时,它无法更新。

"typeProperties": {
    "recurrence": {
        "frequency": "Week",
        "interval": 1,
        "startTime": "2023-01-23T032:00:00",
        "timeZone": "W. Europe Standard Time",
        "schedule": {
            "minutes": [
                0
            ],
            "hours": [
                5
            ],
            "weekDays": [
                "Monday",
                "Tuesday",
                "Wednesday",
                "Thursday",
                "Friday"
            ]
        }
    }
}

我尝试了以下方式:

az datafactory trigger update --factory-name "***" --resource-group "**" --name "Daily_pipeline" --set properties.recurrence.schedule.weekDays=["Monday","Tuesday","Wednesday"]

但它无法正确更新,而是将其更新为null。

英文:

Hi @pratik every things goes well but when I use the same methodology to update the weekDays Value it fails to update,

"typeProperties": {
            "recurrence": {
                "frequency": "Week",
                "interval": 1,
                "startTime": "2023-01-23T032:00:00",
                "timeZone": "W. Europe Standard Time",
                "schedule": {
                    "minutes": [
                        0
                    ],
                    "hours": [
                        5
                    ],
                    "weekDays": [
                        "Monday",
                        "Tuesday",
                        "Wednesday",
                        "Thursday",
                        "Friday"
                    ]
                }
            }

I treid this way:

az datafactory trigger update --factory-name "***" --resource-group "**" --name "Daily_pipeline" 
--set properties.recurrence.schedule.weekDays=["Monday","Tuesday","Wednesday"]

it seValue it fails to properly instead it updates as a null,

huangapple
  • 本文由 发表于 2023年7月27日 14:58:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/76777196.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定