Closed mindlessroman closed 1 year ago
Hi @mindlessroman, you can import enum variable directly by from azure.mgmt.datafactory.models import AmazonRdsForOraclePartitionOption
since it has been in __all__
of __init__.py
:
https://github.com/Azure/azure-sdk-for-python/blob/b061c2864632a7fc827f5320cadc8c98d2dd0586/sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py#L728-L733
Hi @mindlessroman. 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.
/unresolve
Hey @msyyc - I don't think that the enum exists right now.
You probably want to use the sub-classes and not this class directly. Known sub-classes are: Flowlet, MappingDataFlow, WranglingDataFlow
An enum that contains those subtypes does not exist in sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_data_factory_management_client_enums.py
Having these be in an Enum would be helpful for changes I'm trying to support in https://github.com/Azure/azure-cli-extensions/pull/5407.
@mindlessroman SDK is generated with swagger. If you want to use these values as enum, there shall be relative enum definition in swagger. Unfortunately, I don't find it in swagger. So I advise you open an issue in https://github.com/Azure/azure-rest-api-specs/issues or make a PR to add it. (enum definition sample: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/datafactory.json#L5105-L5110)
@msyyc - Excellent, thank you for the example! I'll connect there.
Hi @mindlessroman. 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 @mindlessroman, 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.
Is your feature request related to a problem? Please describe. Instead of needing to expose a protected list of Data Flow types in
sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_models_py3.py
because it's bad practice to access protected properties/methods.Describe the solution you'd like It would be nice if there was an enum that was accessible
sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/_data_factory_management_client_enums.py
Describe alternatives you've considered Hardcoding the list is less desirable since things could change in the future and that's more code to update elsewhere.
Additional context n/a