Using components: Google Cloud Spanner Source

Use the Google Cloud Spanner source component to read data stored in a Cloud Spanner table or using a query.

Connection

Select an existing Google Cloud Spanner connection or create a new one.

Source Properties

  • Access mode - select table to extract an entire table or query to execute a query.
  • Source table - the table name from which the data will be imported.
  • where clause - optional. You can add predicates clauses to the WHERE clause as part of the SQL query that is built in order to get the data from the database. Make sure to skip the keyword WHERE.
    Goodprod_category = 1 AND prod_color = 'red'
    BadWHERE prod_category = 1 AND prod_color = 'red'
  • Query - type in a SQL query. Make sure to name all columns uniquely.

Source Schema

After defining the source table/query select the fields to use in the source.

With table access mode, the fields you select are used to build the query that will be executed to read the data.

With query access mode, select all the fields that are defined in the query and make sure to use the same column names

Define the data type for the field. Use the following table when matching database data types to Xplenty data types.

Cloud Spanner Xplenty
BOOL Boolean
INT64 Long
FLOAT64 Double
STRING(n) String
BYTES(n) Binary
DATE Datetime
TIMESTAMP Datetime

Feedback and Knowledge Base