Overview
Wirekite supports Google Cloud Spanner as a target database for:- Schema Loading - Create target tables from Wirekite’s intermediate schema format
- Data Loading - Bulk load extracted data using Spanner mutations
- Change Loading (CDC) - Apply ongoing changes using shadow table merge approach
Spanner loaders respect Spanner’s mutation limits (80,000 mutations per commit). The Change Loader uses shadow tables with
_wkm suffix for atomic change application.Prerequisites
Before configuring Spanner as a Wirekite target, ensure the following requirements are met:Google Cloud Configuration
- Project Setup: Have a Google Cloud project with Spanner API enabled
- Instance & Database: Create a Spanner instance and database
- Authentication: Configure Application Default Credentials or service account
- IAM Permissions: Ensure the service account has:
spanner.databases.readspanner.databases.writespanner.sessions.create
Spanner Limitations
Schema Loader
The Schema Loader reads Wirekite’s intermediate schema format (.skt file) and generates Spanner-appropriate DDL statements for creating target tables.
The Schema Loader can also generate Change Stream DDL for Spanner-to-Spanner replication scenarios.
Required Parameters
Path to the Wirekite schema file (
.skt) generated by the Schema Extractor. Must be an absolute path.Output file for CREATE TABLE statements. Includes both base tables and merge tables for CDC operations.
Output file for constraint definitions (indexes, unique constraints).
Output file for FOREIGN KEY constraints (interleaved tables in Spanner).
Absolute path to the log file for Schema Loader operations.
Optional Parameters
Output file for DROP TABLE statements. Set to “none” to skip generation.
Output file for recovery table creation DDL. Set to “none” to skip.
Output file for CREATE CHANGE STREAM statement. Used when Spanner is also a source.
Output file for DROP CHANGE STREAM statement. Set to “none” to skip.
Change stream retention period. Maximum is “7d” (7 days) for Spanner.
When
true, generates merge tables (_wkm suffix) for CDC operations. Set to false if only doing data loads.Data Loader
The Data Loader reads Wirekite’s intermediate data format (.dkt files) and loads records into Spanner tables using batched mutations.
Required Parameters
Path to a file containing the Spanner connection string.
Directory containing data files (
.dkt) to load.Path to the Wirekite schema file used by Schema Loader. Required for table structure information.
Absolute path to the log file for Data Loader operations.
Optional Parameters
Maximum number of parallel threads for loading tables.
Set to
true if data was extracted using hex encoding instead of base64.Change Loader
The Change Loader applies ongoing data changes (INSERT, UPDATE, DELETE) to Spanner tables using a merge approach with shadow tables.Required Parameters
Path to a file containing the Spanner connection string.
Directory containing change files (
.ckt) from the Change Extractor.Working directory for temporary files during merge operations. Must be writable.
Path to the Wirekite schema file for table structure information.
Absolute path to the log file for Change Loader operations.
Optional Parameters
When
true, loads changes locally.Maximum number of change files to process in a single batch.
When
true, uses shadow table merge approach. When false, uses direct mutations.Orchestrator Configuration
When using the Wirekite Orchestrator, prefix target parameters withtarget.schema., target.data., or target.change..
Example orchestrator configuration for Spanner target:
