Powershell Set-AzSynapseLinkedService returns error Object reference not set to an instance of an object

Steve Cardella 11 Reputation points
2021-05-03T16:40:50.543+00:00

I'm trying to migrate a known-working Data Factory solution to an Azure Synapse Workspace. I'm getting the "object reference not set to an instance of an object" error on using Powershell to deploy one of my linked services.

I've done a similar deployment before with Data Factory with no issues. Here, I'm getting issues deploying one of my linked services and it's preventing me from auto-deploying the rest. The self-hosted runtime deployed fine. 11 of 12 linked services deployed fine.

However, our databricks connection will not deploy (with the same code in a loop) via the powershell command:

Set-AzSynapseLinkedService -WorkspaceObject $ws -DefinitionFile $ls -Name $ls.BaseName

I've deployed the Databricks linked service with the same file and the equivalent DataFactoryV2 Powershell command. I tried creating it in the Workspace portal by pasting in the JSON from the file, and that worked fine. When it saved, it added the autoresolveintegrationruntime reference to the json when I saved it in the workspace. This seems to be an error with the Powershell command, not an absolute barrier to deployment. I saved off the json with the runtime info to a file. Then I deleted the linked service from the portal and tried to deploy with the revised json file. It was still not working.

Here's the databricks JSON. (filename = ls_azure_databricks.json)

{
    "name": "ls_azure_databricks",
    "properties": {
        "annotations": [],
        "type": "AzureDatabricks",
        "typeProperties": {
            "domain": {
                "type": "AzureKeyVaultSecret",
                "store": {
                    "referenceName": "ls_keyvault",
                    "type": "LinkedServiceReference"
                },
                "secretName": "kv-databricks-url"
            },
            "authentication": "MSI",
            "workspaceResourceId": {
                "type": "AzureKeyVaultSecret",
                "store": {
                    "referenceName": "ls_keyvault",
                    "type": "LinkedServiceReference"
                },
                "secretName": "kv-databricks-workspace-resourceid"
            },
            "existingClusterId": {
                "type": "AzureKeyVaultSecret",
                "store": {
                    "referenceName": "ls_keyvault",
                    "type": "LinkedServiceReference"
                },
                "secretName": "kv-databricks-clusterid"
            }
        }
    }
}

Any ideas?

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,102 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,346 questions
Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
1,910 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,355 questions
{count} vote