Authentication Service account JSON
Description
No description available [API reference]
Instructions
Service-account JSON path. Use this for unattended Linked Server, ADF, or Power BI gateway refresh.
- In Google Cloud Console open IAM & Admin > Service Accounts and create an account.
- Grant a Spanner role such as
Cloud Spanner Database User(read) or a writer role if you need DML. - Create a JSON key and download it to a folder only the DSN process can read. Do not put the key in the connector XML or git/TFVC.
- Set GOOGLE_APPLICATION_CREDENTIALS or paste the JSON file path into Credentials file.
- Fill Project, Instance, and Database (from Spanner Studio).
- Finish the wizard. Then click Test Connection on the DSN Main UI (the wizard does not run Test Connection).
- Done. You can query from C#, Python, PowerShell, and ODBC apps.
Parameters
| Parameter | Required | Default value | Options |
|---|---|---|---|
|
Name:
Label: JDBC driver file(s) Filled by the wizard after download. Separate multiple JARs with a semicolon (e.g. C:\ZappySys\Jdbc\MyConnector\driver.jar). |
YES |
C:\ZappySys\Jdbc\Google Cloud Spanner\google-cloud-spanner-jdbc-2.40.0-single-jar-with-dependencies.jar
|
|
|
Name:
Label: Project id GCP project id (e.g. MY_PROJECT). |
YES |
MY_PROJECT
|
|
|
Name:
Label: Instance id Spanner instance id (e.g. MY_INSTANCE). |
YES |
MY_INSTANCE
|
|
|
Name:
Label: Credentials file (JSON) Full path to the service-account JSON key. The wizard maps this to the JDBC credentials property (e.g. C:\keys\spanner.json). |
YES | ||
|
Name:
Label: Driver class Optional. Leave blank to auto-detect from the JAR unless SPI is ambiguous (e.g. com.google.cloud.spanner.jdbc.JdbcDriver). |
com.google.cloud.spanner.jdbc.JdbcDriver
|
||
|
Name:
Label: Database name Database, schema, or catalog name (e.g. MyDatabase). |
MyDatabase
|
||
|
Name:
Label: Credentials path Path to the service-account JSON key (e.g. C:\keys\spanner.json). |
C:\keys\spanner.json
|