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

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

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,

  1. "type": "ScheduleTrigger",
  2. "typeProperties": {
  3. "recurrence": {
  4. "frequency": "Day",
  5. "interval": 1,
  6. "startTime": "2023-07-07T05:28:00",
  7. "timeZone": "W. Europe Standard Time",
  8. "schedule": {
  9. "minutes": [
  10. 10
  11. ],
  12. "hours": [
  13. 16
  14. ]
  15. }
  16. }
  17. }

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**参数指定要更新现有触发器的属性路径和值。

  1. 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.

  1. 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的值时,它无法更新。

  1. "typeProperties": {
  2. "recurrence": {
  3. "frequency": "Week",
  4. "interval": 1,
  5. "startTime": "2023-01-23T032:00:00",
  6. "timeZone": "W. Europe Standard Time",
  7. "schedule": {
  8. "minutes": [
  9. 0
  10. ],
  11. "hours": [
  12. 5
  13. ],
  14. "weekDays": [
  15. "Monday",
  16. "Tuesday",
  17. "Wednesday",
  18. "Thursday",
  19. "Friday"
  20. ]
  21. }
  22. }
  23. }

我尝试了以下方式:

  1. 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,

  1. "typeProperties": {
  2. "recurrence": {
  3. "frequency": "Week",
  4. "interval": 1,
  5. "startTime": "2023-01-23T032:00:00",
  6. "timeZone": "W. Europe Standard Time",
  7. "schedule": {
  8. "minutes": [
  9. 0
  10. ],
  11. "hours": [
  12. 5
  13. ],
  14. "weekDays": [
  15. "Monday",
  16. "Tuesday",
  17. "Wednesday",
  18. "Thursday",
  19. "Friday"
  20. ]
  21. }
  22. }

I treid this way:

  1. az datafactory trigger update --factory-name "***" --resource-group "**" --name "Daily_pipeline"
  2. --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:

确定