Oninit Logo
The Down System Specialists
+1-913-732-8892
+44-2081-337529
Partnerships Contact

Oninit® Log Ripper — SQL Mapping

How each captured Informix construct is rewritten for each supported target dialect. The rewriter runs once per record at output time and emits per-dialect SQL that the target server parses natively — no operator-side pre-processing, no manual literal substitution. The cells below show the form the captured record takes before it leaves the ripper for the target.

The matrix is organised by SQL dialect, not by wire transport. A captured row arrives at PostgreSQL the same way whether it goes through the native libpq connector (target.mode: postgres) or through unixODBC + the PostgreSQL ODBC driver (target.mode: odbc, sql_dialect: postgres) — the rewriter's output is identical, and the dialect column reflects the per-server SQL form. The MSSQL column applies via unixODBC + FreeTDS (MSSQL has no native dlopen-friendly client on Linux); the others are reachable via their respective native connectors but the dialect rewriter is independent of the transport choice. See the Output Options page for the per-mode YAML and the Schema Translation page for end-to-end examples of each rewrite.

Dialect mapping

Captured construct Informix PostgreSQL MySQL MariaDB Db2 LUW Oracle MSSQL Ingres
BOOLEAN literal (SET / WHERE / INSERT VALUES) pass-through ('t' / 'f') TRUE / FALSE 1 / 0 1 / 0 TRUE / FALSE 1 / 0 1 / 0 TRUE / FALSE
INTERVAL DAY TO SECOND / YEAR TO MONTH pass-through INTERVAL '…' (native) /*INTERVAL DAY TO SECOND*/'…' (VARCHAR fallback) /*INTERVAL DAY TO SECOND*/'…' (VARCHAR fallback) /*INTERVAL DAY TO SECOND*/'…' (VARCHAR fallback) INTERVAL '…' DAY TO SECOND (native) /*INTERVAL DAY TO SECOND*/'…' (VARCHAR fallback) INTERVAL '…' DAY TO SECOND (native)
Embedded NUL splice ('a' || CHR(0) || 'b') pass-through E'\x61\x00\x62' 0x610062 0x610062 BLOB(X'610062') HEXTORAW('610062') 0x610062 X'610062'
DECIMAL value (precision ≤ 31 digits) pass-through literal → NUMERIC literal → DECIMAL(38,16) literal → DECIMAL(38,16) literal → DECFLOAT(34) literal → NUMBER(p,s) literal → DECIMAL(38,16) literal → DECIMAL(p,s) / FLOAT8
DECIMAL value (32+ digit literal) pass-through pass-through pass-through pass-through DECFLOAT('…') cast wrap (Db2 parser caps literals at 31 digits) pass-through pass-through pass-through
DATETIME literal pass-through pass-through pass-through pass-through SPACE→DASH, COLON→DOT (Db2 dot-and-dash form) pass-through (with session NLS_TIMESTAMP_FORMAT) pass-through (target DATETIME2(N)) pass-through
MDY() built-in — (CDC delivers resolved DATE) MAKE_DATE(y, m, d) STR_TO_DATE(CONCAT_WS('-', y, m, d), '%Y-%c-%e') STR_TO_DATE(CONCAT_WS('-', y, m, d), '%Y-%c-%e') DATE(VARCHAR(y) || '-' || VARCHAR(m) || '-' || VARCHAR(d)) TO_DATE(y || '-' || m || '-' || d, 'YYYY-MM-DD') DATEFROMPARTS(y, m, d) DATE(VARCHAR(y) + '-' + VARCHAR(m) + '-' + VARCHAR(d))
TODAY built-in — (CDC delivers resolved DATE) CURRENT_DATE CURDATE() CURDATE() CURRENT_DATE CURRENT_DATE CAST(GETDATE() AS DATE) CURRENT_DATE
Identifier quoting (table / column names colliding with reserved words) pass-through (Informix accepts key, user unquoted) pass-through (PG accepts most unquoted) pass-through pass-through pass-through pass-through (DDL must be unquoted lowercase — Oracle case-folds to upper) [colname] / [tabname] (always-bracket) pass-through
BLOB / CLOB pass-through '\xNN…'::bytea 0xNN…LONGBLOB 0xNN…LONGBLOB BLOB(X'NN…') HEXTORAW('NN…'); UPDATE/DELETE WHERE clauses drop the BLOB column (Oracle's no-LOB-comparison rule) 0xNN…VARBINARY(MAX) X'NN…'

Latin-1 byte preservation through NCHAR / NVARCHAR captures is handled at connector-init time so the captured bytes round-trip into the target column without re-encoding. The Schema Translation page covers the per-dialect target column types; the Configuration page covers the YAML knobs the operator sets per target.

To discuss how Oninit ® can assist please call on +1-913-732-8892 or alternatively just send an email specifying your requirements.


You get all this for free.. think about what you get if you pay us