Trying to connect Synapse with Google BigQuery using Key File JSON String

Copper Contributor

Hello all,

 

I am trying to set up a Linked Service to Google BigQuery using service authentification.

 

I understand I can do it with the following JSON code:

 

{
    "name": "GoogleBigQueryLinkedService",
    "properties": {
        "type": "GoogleBigQueryV2",
        "typeProperties": {
            "projectId": "<project ID>",
            "authenticationType": "ServiceAuthentication",
            "keyFileContent": {
                "type": "SecureString",
                "value": "<key file JSON string>"
            }
        }
    }
}

 

My key file JSON string looks als following:

 

{
"type":"service_account",
"project_id":"xxx",
"private_key_id":"xxx",
"private_key":"-----BEGIN PRIVATE KEY-----\nxxx\n-----END PRIVATE KEY-----\n",
"client_email":"xxx",
"client_id":"xxx",
"auth_uri":"https://accounts.google.com/o/oauth2/auth",
"token_uri":"https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/xxx"
}

 

Now I try to add this JSON string to the code like following:

 

{
    "name": "GoogleBigQuery",
    "properties": {
        "type": "GoogleBigQueryV2",
        "typeProperties": {
            "projectId": "xxx",
            "authenticationType": "ServiceAuthentication",
            "keyFileContent": {
                "type": "SecureString",
                "value": {"type":"service_account","project_id":"xxx","private_key_id":"xxx","private_key":"-----BEGIN PRIVATE KEY-----\nxxx\n-----END PRIVATE KEY-----\n","client_email":"xxx","client_id":"xxx","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/xxx"}
            }
        }
    }
}

 

However this does not work and produces the following errors when trying to test the connection:

 

The value type 'System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]', in key 'value' is not expected type 'System.String'

Activity ID: 7aa173bf-82c9-4a0a-b005-92c3f3ff00b6

 

Any idea what I am doing wrong here?

0 Replies