I try to run this command to Create Azure Databricks Linked Services
Set-AzDataFactoryV2LinkedService -Force -ResourceGroupName MYDEVRESOURCEGROUP -DataFactoryName MYDEVADF -Name LS_ADB_JOB_01 -DefinitionFile ./LS_ADB_JOB_01.json
LS_ADB_JOB_01.json
is containing content
.
.
.
"newClusterSparkEnvVars": {
"PYSPARK_PYTHON": "/databricks/python3/bin/python3"
},
"newClusterVersion": "@linkedService().ClusterVersion",
"newClusterDriverNodeType": "@linkedService().DriverNodeType",
"clusterOption": "Autoscaling",
"newClusterInitScripts": [
"/Workspace/Ingestion/init_odbc_driver.sh"
],
"dataSecurityMode": "SINGLE_USER"
},
.
.
.
Then this command is run successfully but "dataSecurityMode": "SINGLE_USER"
is not appear on ADF
How can I fix this?
I have tried to create AzureDatabrick linked service in Azure Data Factory with latest PowerShell and Az module version.
When I checked it from Azure Datafactory UI "dataSecurityMode": "SINGLE_USER"
and "clusterOption": "Autoscaling"
these two parameters are missing.
This can be a bug to workaround this you can use Rest API to update the Linked service
PUT https://management.azure.com/subscriptions/SubscriptionId/resourceGroups/pdstackdemo/providers/Microsoft.DataFactory/factories/pdstackadf/linkedservices/LS_ADB_JOB_01?api-version=2018-06-01
body:
{
"properties": {
"parameters": {
"Cluster_version": {
"type": "String"
},
"Cluster_Node_Type": {
"type": "String"
},
"Driver_node_type": {
"type": "String"
}
},
"annotations": [],
"type": "AzureDatabricks",
"typeProperties": {
"domain": "https://adb-762.8.azuredatabricks.net",
"newClusterNodeType": "@linkedService().Cluster_Node_Type",
"newClusterNumOfWorker": "2:4",
"newClusterSparkEnvVars": {
"PYSPARK_PYTHON": "/databricks/python3/bin/python3"
},
"newClusterVersion": "@linkedService().Cluster_version",
"newClusterDriverNodeType": "@linkedService().Driver_node_type",
"clusterOption": "Autoscaling",
"newClusterInitScripts": [],
"dataSecurityMode": "SINGLE_USER"
}
}
}
This will Update the linked service with all appropriate parameters: