Google Cloud Spanner Connector > Mapping tasks with Google Cloud Spanner > Google Cloud Spanner targets in mapping tasks
  

Google Cloud Spanner targets in mapping tasks

To write data to a Google Cloud Spanner target, configure a Google Cloud Spanner object as the Target transformation in a mapping.
Specify the name and description of the Google Cloud Spanner target. Configure the target and advanced properties for the target object.
The following table describes the target properties that you can configure for a Google Cloud Spanner target:
Property
Description
Connection
Name of the Google Cloud Spanner connection that is associated with a database.
Target Type
Type of the Google Cloud Spanner target objects available. Select Single Object or Parameter.
You cannot write data to multiple objects.
Object
Name of the Google Cloud Spanner target table based on the target type selected.
Create New at Runtime
Not applicable for Google Cloud Spanner Connector.
Operation
You can select one the following operations:
  • - Insert
  • - Update
  • - Upsert (Update or Insert)
  • - Delete
Update Columns
Specifies the primary key field to delete target data.
The following table describes the advanced properties that you can configure for a Google Cloud Spanner target:
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.
  • - 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.
Success File Directory
Not applicable for Google Cloud Spanner Connector.
Error File Directory
Not applicable for Google Cloud Spanner Connector.