Connections for INFACore > Connections to source and target endpoints > Google Cloud Spanner
  

Google Cloud Spanner

When you create a Google Cloud Spanner connection, configure the connection properties.

Feature snapshot

Operation
Support
Read
Yes
Write
Yes

Before you begin

Before you configure the connection properties, you'll need to get information from your Google Cloud Platform Spanner Account.
The following video shows you how to get information from your Google Cloud Platform Spanner account:
https://infa.media/3cv4Pk5

Connection properties

The following table describes the Google Cloud Spanner connection properties:
Property
Description
Connection Name
Name of the connection.
Each connection name must be unique within the organization. Connection names can contain alphanumeric characters, spaces, and the following special characters: _ . + -,
Maximum length is 255 characters.
Project ID
The project_ID value in the JSON file that you download after you create a service account.
If you have created multiple projects with the same service account, enter the ID of the project that contains the Cloud Spanner instance that you want to connect to.
Instance ID
Name of the instance that you created in Google Cloud Spanner.
Service Account ID
The client_email value in the JSON file that you download after you create a service account.
Service Account Key
The private_key value in the JSON file that you download after you create a service account.

Read properties

The following table describes the advanced source properties that you can configure in the Python code to read from Google Cloud Spanner:
Property
Description
Source Database
Optional. Overrides the Google Cloud Spanner database name that contains the Google Cloud Spanner source table that you specified in the Source transformation.
Source Table
Optional. Overrides the Google Cloud Spanner source table name that you specified in the Source transformation.
Batch Size
Minimum number of rows that the Secure Agent reads in a batch. Enter a number greater than 0.
Default is 0.
Enable Bulk Read
Select this property to read data from large Google Cloud Spanner tables.
IndexDirective
The index name to query a table in an SQL statement.
To specify an index directive, use the following syntax:
FROM TableName@{FORCE_INDEX=TableIndex}
For more information about index directives, go to the following website: https://cloud.google.com/spanner/docs/secondary-indexes

Write properties

The following table describes the advanced target properties that you can configure in the Python code to write to Google Cloud Spanner:
Property
Description
UpdateMode
Determines the mode that the Secure Agent uses to update rows in the Google Cloud Spanner target.
You can select one of the following modes:
  • - Update As Update. The Secure Agent updates all rows flagged for update if the entries exist in the target.
  • - Update Else Insert. The Secure Agent first updates all rows flagged for update if the entries exist in the target. If the entries do not exist, the Secure Agent inserts the entries.
Default is Update as Update.
Target DataBase
Optional. Overrides the Google Cloud Spanner database name that contains the Google Cloud Spanner target table that you specified in the Target transformation.
Target Table
Optional. Overrides the Google Cloud Spanner target table name that you specified in the Target transformation.
Batch Size
Minimum number of rows in a batch. Enter a number greater than 0.
Default is 100.
Create Table If Required
If the table is not present in the target database, the Secure Agent creates the target table with the name that you specify in the Target Table field. The Secure Agent creates the table with the same schema as the target table that you specified in the Target transformation.
Create DataBase If Required
If the database specified in the Target DataBase field is not present in the Google Cloud Spanner instance, the Secure Agent creates the target database with the name that you specify in the Target Database field.
Write Truncate
When you set the attribute to True, the Secure Agent overwrites the existing data in the target table.
Note: The Write Truncate option is applicable only when you perform an insert operation on a Google Cloud Spanner target.