Closed csotomon closed 2 years ago
@csotomon Thanks for your report! Directing this to the right people.
You should use 'TriggerResource' instead of 'ScheduleTrigger'.
According to
, You should use 'TriggerResource' instead of 'ScheduleTrigger'.
I am following the example in https://docs.microsoft.com/en-us/azure/data-factory/how-to-create-schedule-trigger#python-sdk. That example creas an object from ScheduleTrigger class. What’s the correct way?
according to the python package code, it should be tr_properties = TriggerResource(description='My scheduler trigger', pipelines = pipelines_to_run, recurrence=scheduler_recurrence)
instead of tr_properties = ScheduleTrigger(description='My scheduler trigger', pipelines = pipelines_to_run, recurrence=scheduler_recurrence)
Using TriggerResource class instead of ScheduleTrigger, i got this error
tr_properties = TriggerResource( TypeError: __init__() missing 1 required keyword-only argument: 'properties'
And the problem is not with the Trigger class, the problem is that TriggersOperations class (this class is used by DataFactoryManagementClient class) is not evolving the JSON message into a properties attribute
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @shawnxzq, @lmy269, @Jingshu923.
Author: | csotomon |
---|---|
Assignees: | msyyc |
Labels: | `bug`, `Data Factory`, `Service Attention`, `Mgmt`, `customer-reported` |
Milestone: | - |
Hi @csotomon I'm closing your PR https://github.com/Azure/azure-sdk-for-python/pull/18963, since this code is auto-generated, meaning we can't fix the code directly. Fix needs to go in OpenAPI description here: https://github.com/Azure/azure-rest-api-specs/tree/master/specification/datafactory/resource-manager
The ADF team was not tagged correctly in your issue and I'm sorry about that, they are tagged now and hopefully should see it and fix the OpenAPI spec. Feel free to email me at microsoft (my email is the same as github alias) if you don't see things moving in a few days.
Thanks,
@lrtoyou1223 Looks like the document for trigger in Python doesn't work as expected, could you please help have a look at this? Thanks!
@csotomon We will check this and update here later, thanks for your patience.
@chez-charlie could you please help on this? It's about creating trigger using python SDK following the doc below, thanks!
https://docs.microsoft.com/en-us/azure/data-factory/how-to-create-schedule-trigger#python-sdk
@csotomon I tagged the wrong owner before, sorry for that.
@shawnxzq and @chez-charlie how can I help you?
@chez-charlie any update on this? Thanks a lot!
Hi @csotomon. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve
” to remove the “issue-addressed” label and continue the conversation.
Hi @csotomon, since you haven’t asked that we “/unresolve
” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve
” to reopen the issue.
/unresolve
Hi @csotomon ,you can try to use
tr_properties = TriggerResource(properties=ScheduleTrigger(description='My schedulertrigger',pipelines=pipelines_to_run,recurrence=scheduler_recurrence))
instead of
tr_properties = TriggerResource(description='My scheduler trigger', pipelines = pipelines_to_run, recurrence=scheduler_recurrence)
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!
/unresolve
Hi @csotomon ,you can try to use
tr_properties = TriggerResource(properties=ScheduleTrigger(description='My schedulertrigger',pipelines=pipelines_to_run,recurrence=scheduler_recurrence))
instead of
tr_properties = TriggerResource(description='My scheduler trigger', pipelines = pipelines_to_run, recurrence=scheduler_recurrence)
This is throwing ValueError: Unknown type of azure resource: TriggerResource
, I've imported TriggerResource from azure.mgmt.datafactory.models
Describe the bug Using the library to create a Data Factory trigger, calling DataFactoryManagementClient.triggers.create_or_update method is not serializing the request body correctly
Serialized example:
The correct serealized body is:
To Reproduce Steps to reproduce the behavior:
Expected behavior Running this code,
\azure\mgmt\datafactory\operations_triggers_operations.py trigger an Exception because the response status code is 400
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.