英文:
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]
我的触发器的初始属性:
执行CLI命令后:
英文:
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:
After executing CLI command:
答案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,
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论