Closed sgupta227 closed 5 years ago
@sgupta227 DatabricksNotebookActivity has property called "libraries". Is this what you are looking for? https://github.com/Azure/azure-sdk-for-python/blob/master/azure-mgmt-datafactory/azure/mgmt/datafactory/models/databricks_notebook_activity.py#L46
@hvermis ya thanks for your comment. I see these features are available with the new release of 0.7.0 version of data-factory-mgmt. But i saw a issue while using it. If i am trying to create a databricks linked service using AzureDatabricksLinkedService it needs the access token to passed as SecureString but when i provide the token as SecureString i am getting this error: TypeError: init() takes 1 positional argument but 2 were given. Which is working fine version 0.6.0. And if i provide access_token without SecureString it works fine. I am just wondering if i am missing here something ? looking forward to hearback from you.
Can you paste your script here?
credentials = ServicePrincipalCredentials(client_id=service_principal_id, secret=service_principal_key, tenant=tenant_id) adfv2_client_obj = DataFactoryManagementClient(credentials, subscription_id) azure_databricks = AzureDatabricksLinkedService(domain=domain, access_token=SecureString(adb_access_token)) databricks_ls = adfv2_client_obj.linked_services.create_or_update(resource_group_name=rg_name, factory_name=df_name, linked_service_name='AzureDatabricks_Python1',properties=azure_databricks)
But the same code is working with azure-datafactory-mgmt 0.6.0 version
@lmazuel can you help? The difference between previous version of AzureDatabricksLinkedService and the current one is the latest has **kwargs instead named arguments. Same for SecureString.
@sgupta227 Are you sure the AzureDatabricksLinkedService line is the one giving you the error? Can you paste full error here?
@hvermis yes i am sure about the error. Since i tested quite number of times. As i know create_or_update method will take parameter if we provide the securestring for token else we will get an error while creation.
@hvermis, did you get any updates on the issue running adf v2 pipelines using azure 0.7.0 version ?
@sgupta227 Did you get your error resolved?
Closing as it diverged from original topic which was resolved.
Hi,
It seems like we don't have parameter option available while creation of DatabricksNotebookActivity using databricks_notebook_activity.py scipt. Is it something can be achieved by some other way or do we need to fix this issue ?
To append the libraries we need another parameter let's say append_libraries which can be something like this:
'append_libraries ': {'key': 'typeProperties.baseParameters', 'type': '{object}'} may be need to consider to update in _attribute_map as well.