How to use the Azure Python SDK to provision a Databricks service?

后端 未结 2 472
臣服心动
臣服心动 2021-01-26 17:39

[Previously in this post I asked how to provision a databricks services without any workspace. Now I\'m asking how to provision a service with a workspace as the first scenario

2条回答
  •  不思量自难忘°
    2021-01-26 18:10

    with help from @Laurent Mazuel and support engineers at Microsoft, I have a solution:

    managed_resource_group_ID = ("/subscriptions/"+sub_id+"/resourceGroups/"+managed_rg_name)
    client = DatabricksClient(credentials, subscription_id)
    workspace_obj = client.workspaces.get(rg_name, databricks_workspace_name)
    client.workspaces.create_or_update(
        {
            "managedResourceGroupId": managed_resource_group_ID,
            "sku": {"name":"premium"},
            "location":location
        },
        rg_name,
        databricks_workspace_name
    ).wait()
    

提交回复
热议问题