Skip to main content

Overview

Wirekite supports PostgreSQL 10 and above (including YugaByte, TigerData, Google AlloyDB, and AWS Aurora PostgreSQL) as a target database for:
  • Schema Loading - Create target tables from Wirekite’s intermediate schema format
  • Data Loading - Bulk load extracted data using COPY command
  • Change Loading (CDC) - Apply ongoing changes using merge table approach
PostgreSQL loaders use the high-performance COPY command for bulk loading. The Change Loader uses shadow tables with $wkm suffix for atomic change application.

Prerequisites

Before configuring PostgreSQL as a Wirekite target, ensure the following requirements are met:

Database Configuration

  1. Version: PostgreSQL 10 or above
  2. User Permissions: Create a Wirekite user with:
    • CREATE TABLE privilege
    • FILE access for COPY operations
    • INSERT, UPDATE, DELETE on target tables
    • Read/write access to Wirekite internal tables (wirekite_progress and wirekite_action)

CLI Tools

Use the psql command line tool or Wirekite cmdline tool to interact with PostgreSQL.
For cloud-managed PostgreSQL (AlloyDB, Aurora, Cloud SQL), you’ll need to use databaseRemote=true (the default) since server-side file access isn’t available.

Schema Loader

The Schema Loader reads Wirekite’s intermediate schema format (.skt file) and generates PostgreSQL-appropriate DDL statements for creating target tables.
If you need to add storage directives or other schema elements, use the CREATE TABLE output as a basis. Don’t change column names, column order, or datatypes to incompatible ones.

Required Parameters

string
required
Path to the Wirekite schema file (.skt) generated by the Schema Extractor. Must be an absolute path.
string
required
Output file for CREATE TABLE statements. Includes both base tables and merge tables for CDC operations.
string
required
Output file for non-columnar constraints including indexes. Column-level constraints (NOT NULL) are in CREATE TABLE.
string
required
Output file for FOREIGN KEY definitions. Consider applying these after initial data load for better performance.
string
required
Absolute path to the log file for Schema Loader operations.

Optional Parameters

string
default:"none"
Output file for DROP TABLE IF EXISTS statements. Set to “none” to skip generation.
string
default:"none"
Output file for recovery table creation SQL. Set to “none” to skip.
boolean
default:"true"
When true, generates merge tables ($wkm suffix) for CDC operations. Set to false if only doing data loads.

Extended Schema Options

When migrating from Oracle, PostgreSQL can generate additional DDL for non-table objects. Set each parameter to a file path to enable, or leave as "none" to skip.
string
default:"none"
Path to the source XKT file containing extended schema objects (views, procedures, etc.).
string
default:"none"
Output file for CREATE INDEX statements.
string
default:"none"
Output file for CREATE SEQUENCE statements.
string
default:"none"
Output file for CREATE VIEW statements.
string
default:"none"
Output file for CREATE MATERIALIZED VIEW statements.
string
default:"none"
Output file for CREATE SYNONYM statements.
string
default:"none"
Output file for GRANT statements.
string
default:"none"
Output file for role and user creation statements.
string
default:"none"
Output file for CREATE SCHEMA statements.
string
default:"none"
Output file for CREATE TRIGGER statements.
string
default:"none"
Output file for CREATE PROCEDURE statements.
string
default:"none"
Output file for CREATE FUNCTION statements.
string
default:"none"
Output file for CREATE PACKAGE statements.

Data Loader

The Data Loader reads Wirekite’s intermediate data format (.dkt files) and loads records into PostgreSQL tables using COPY commands.

Required Parameters

string
required
Path to a file containing the PostgreSQL connection string.
Connection string format:
Example:
string
required
Directory containing data files (.dkt) to load.
string
required
Path to the Wirekite schema file used by Schema Loader. Required for table structure information.
string
required
Absolute path to the log file for Data Loader operations.

Optional Parameters

integer
default:"5"
Maximum number of parallel threads for loading tables. We recommend setting this to the number of CPUs on the host.
boolean
default:"false"
Set to true if data was extracted using hex encoding instead of base64.
boolean
default:"true"
When true, uses COPY FROM STDIN. When false, uses local file I/O methods.
boolean
default:"true"
When true, removes data files from inputDirectory after loading. Should typically be true to save disk space.

Change Loader

The Change Loader applies ongoing data changes (INSERT, UPDATE, DELETE) to PostgreSQL tables using a merge approach with shadow tables.
The Change Loader uses merge tables to stage changes before applying them atomically to base tables.

Required Parameters

string
required
Path to a file containing the PostgreSQL connection string.
Connection string format:
string
required
Directory containing change files (.ckt) from the Change Extractor.
string
required
Working directory for intermediate files during merge operations.
string
required
Path to the Wirekite schema file for table structure information.
string
required
Absolute path to the log file for Change Loader operations.

Optional Parameters

boolean
default:"true"
When true, indicates remote database connection mode.
integer
default:"60"
Maximum number of change files to process in a single batch.
boolean
default:"true"
When true, removes change files from inputDirectory after fully processing. Should typically be true to save disk space.
The Change Loader should not start until the Data Loader has successfully completed the initial full load.

Orchestrator Configuration

When using the Wirekite Orchestrator, prefix target parameters with target.schema., target.data., or target.change.. Example orchestrator configuration for PostgreSQL target:
For complete Orchestrator documentation, see the Execution Guide.