Using components: Google Spanner Destination

Use the Google Spanner destination component to store the output of a data flow in a Google Spanner table.

Connection

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

Destination Properties

  • Target table - the name of the target table. By default, if the table doesn't exist, it will be created automatically.
  • Automatically create table if it doesn't exist - if unchecked and the table doesn't exist, the job fails.
  • Automatically add missing columns - when checked, the job will check if each of the specified columns exist in the table and if one does not exist, it will add it. Key columns can't be automatically added to a table.

Operation type

Append (Insert only) - default behaviour. Data will only be appended to the target table

Merge with existing data using Insert or Update - If the key values are found in the table, update the non-key columns provided in the flow. If it doesn't exist, insert new row to the table.

Merge with existing data using Replace - Rows that exist in the table (found by their key values) are deleted, and the column data provided in the flow is inserted.

Pre and post action SQL

Pre-action SQL - SQL code to execute before inserting the data into the target table.

Post-action SQL - SQL code to execute after inserting the data into the target table.

Schema Mapping

Map the dataflow fields to the target table's columns. Columns defined as key will be used as the sort key when Xplenty creates the table. If merge operation is used, you must select at least a field or multiple fields as keys, which will be used to uniquely identify rows in the table for the merge operation.

The following table displays matching the matching data types:

Xplenty Cloud Spanner
String STRING(MAX)
Integer INT64
Long INT64
Float FLOAT64
Double FLOAT64
DateTime TIMESTAMP
Binary BYTES(MAX)
Boolean BOOL

Automatically creating and altering destination table

Xplenty can automatically create the destination table for you if it doesn't exist and it can also append columns to an existing table. If you define columns as key (regardless of the operation type), Xplenty defines them as the primary key in a new table. The data types in Xplenty are automatically mapped as defined in the table above. Note that since Xplenty doesn't have a notion of maximum string length, the string columns are created with the maximum length allowed.

Creating packages

  1. Creating a new package in New Xplenty
  2. Creating a workflow
  3. Working in the new package designer
  4. Validating a package
  5. Using components: Amazon Redshift Source
  6. Using components: Bing Ads Source
  7. Using components: Database Source
  8. Using components: Facebook Ads Insights Source
  9. Using components: File Storage Source
  10. Using components: Google Adwords source
  11. Using components: Google Analytics Source
  12. Using components: Google BigQuery Source
  13. Using components: Google Cloud Spanner Source
  14. Using components: MongoDB Source
  15. Using components: NetSuite Source
  16. Using components: Salesforce source
  17. Using components: Rest API Source
  18. Using components: Aggregate Transformation
  19. Using components: Assert Transformation
  20. Using components: Clone transformation
  21. Using components: Cross Join Transformation
  22. Using components: Distinct Transformation
  23. Using components: Filter Transformation
  24. Using components: Join Transformation
  25. Using components: Limit Transformation
  26. Using components: Rank Transformation
  27. Using components: Select Transformation
  28. Using components: Sort Transformation
  29. Using components: Union Transformation
  30. Using components: Window Transformation
  31. Using components: Sample Transformation
  32. Using components: Cube transformation
  33. Using components: Amazon Redshift Destination
  34. Using components: Database Destination
  35. Using components: File Storage Destination
  36. Using components: Google BigQuery Destination
  37. Using components: Google Spanner Destination
  38. Using components: MongoDB Destination
  39. Using components: Salesforce Destination
  40. Using components: Snowflake Destination (beta)
  41. Using and setting variables in your packages
  42. System and pre-defined variables
  43. Using pattern-matching in source component paths
  44. Using ISO 8601 string functions
  45. Using Expressions in Xplenty
  46. Xplenty Functions

Feedback and Knowledge Base