Use the Google Cloud Spanner source component to read data stored in a Cloud Spanner table or using a query.
Select an existing Google Spanner connection or create a new one (for more information, see Allowing Xplenty access to my Google Cloud Spanner instance.)
- 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.
prod_category = 1 AND prod_color = 'red'
WHERE prod_category = 1 AND prod_color = 'red'
- Query - type in a SQL query. Make sure to name all columns uniquely.
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.