Snowflake Iceberg tables
PipelineWise supports a Snowflake Iceberg table only when all conditions hold:
The table is Snowflake-managed Iceberg version 3.
ICEBERG_MERGE_ON_READ_BEHAVIOR = 'DISABLED'is set explicitly at table level, so Snowflake uses copy-on-write.Every string column has physical
CHARACTER_MAXIMUM_LENGTH134,217,728.The table and every replicated column were created by PipelineWise FullSync, PartialSync,
target-snowflake, or the supported native-to-Iceberg converter.
PipelineWise rejects other Iceberg versions, external catalogs, and tables that do not meet the copy-on-write or string-width requirement before writing.
Singer can load managed v3 from any source compatible with
target-snowflake. MariaDB, MySQL, and PostgreSQL also support FastSync
FullSync and PartialSync. Native Snowflake tables remain the default.
Support
Source |
Singer |
FastSync FullSync |
FastSync PartialSync |
|---|---|---|---|
MariaDB |
Yes |
Yes |
Yes |
MySQL |
Yes |
Yes |
Yes |
PostgreSQL |
Yes |
Yes |
Yes |
Other compatible Singer sources, for example Salesforce |
Yes |
No |
No |
Connector support levels still apply and are listed in Connectors. A source outside MariaDB, MySQL, and PostgreSQL can use managed Iceberg v3 only when PipelineWise routes the selected streams through Singer. Any Iceberg selection that would invoke another source’s FastSync component is rejected before mutation. YugabyteDB does not support managed Iceberg targets yet.
Snowflake prerequisites
PipelineWise creates explicit v3 tables with CATALOG = 'SNOWFLAKE' and no
EXTERNAL_VOLUME clause. Snowflake therefore uses the effective schema,
database, or account default, or Snowflake-managed storage when no other default
is set. New tables use one day of data retention, Snowflake’s automatic target
file sizing, compatible storage serialization, and automatic data compaction;
these values are not configurable per tap. Compatible serialization prioritizes
Parquet encoding and compression that interoperates with third-party engines.
PipelineWise sets the required table parameter on every managed v3 table it
creates or replaces. Snowflake UPDATE, DELETE, and MERGE therefore
use copy-on-write and do not create deletion vectors. PipelineWise does not use
the deprecated ENABLE_ICEBERG_MERGE_ON_READ parameter.
PipelineWise creates and adds managed-v3 string columns explicitly as
VARCHAR(134217728). This is Snowflake’s maximum declared character width;
the 128 MB encoded-value limit still applies, so multi-byte values can reach the
byte limit with fewer characters. Existing managed-v3 strings must have the same
physical width before PipelineWise writes them.
Warning
PipelineWise must be the only writer. External reads are allowed, but an external writer can choose a write mode or delete representation outside the Snowflake parameter and break the copy-on-write contract.
To use your own cloud storage, create an external volume and configure it as a default on the schema, database, or account. For example:
CREATE OR REPLACE EXTERNAL VOLUME <external_volume> ...;
ALTER DATABASE <target_database>
SET EXTERNAL_VOLUME = <external_volume>;
The target role needs the parent-object, warehouse, staging, and table privileges
required by the selected operation, including CREATE ICEBERG TABLE. A custom
external volume also requires its applicable privileges. PipelineWise reports
Snowflake privilege and storage errors rather than attempting to reconfigure the
account. See Snowflake’s managed Iceberg table documentation.
Metadata preflight can inspect only objects visible to the target role. Use a role that can see dependent streams, policies, tags, grants, and comments before an operation that might replace a table.
Configure a tap
Set the desired format in any tap whose Singer output is compatible with
target-snowflake. The setting applies to every selected table in that tap:
target: "snowflake"
target_table_format: iceberg
iceberg_version: 3
version_legacy_float_columns: false
These tap-level settings are the only valid Iceberg selection. Omitting
target_table_format or selecting native creates native tables. Target
configuration rejects these keys and the removed iceberg_create setting;
remove iceberg_create and configure each Iceberg tap before upgrading.
MariaDB, MySQL, and PostgreSQL taps require data_flattening_max_level: 0 because
their initial load can use FastSync before handing the stream to Singer.
Singer-only sources retain their normal flattening setting; for example,
Salesforce’s default level 10 is valid. A physical format mismatch fails
before mutation. To move a tap’s existing native tables to Iceberg, enable
automatic conversion or use the
manual command below during a controlled outage. Writers never convert tables.
With flattening disabled, nested objects and arrays use VARIANT only with
explicit v3 configuration. A Singer-only tap with a non-zero flattening level
continues to apply its normal target flattening behavior. Keep
target_table_format and iceberg_version for the tap’s lifetime. Removing
them selects the native contract and fails on an existing Iceberg table rather
than converting it silently.
Explicit v3 maps integer Singer fields to NUMBER(38,0) and approximate
numeric fields to Iceberg DOUBLE. The latter preserves 64-bit floating-point
range instead of narrowing to Iceberg FLOAT. Native and fixed-point
NUMBER(precision, scale) columns preserve supported MariaDB/MySQL and PostgreSQL
decimal dimensions. PostgreSQL numeric primary keys use canonical text to retain
NaN identities. Existing legacy floating-point decimal columns remain
unchanged unless version_legacy_float_columns is enabled on the
tap. During Singer schema changes, an existing primary-key column keeps its live
target type when the current mapping differs. Use FullSync to recreate it with
the current mapping. Singer also keeps a nonempty legacy MariaDB/MySQL
primary-key subset and groups retained floating-point decimal keys by their
loaded target value. See Decimal mapping for fallback, versioning,
and key compatibility. PostgreSQL hstore maps to VARIANT on this route. For
MariaDB sources, a
LONGTEXT column with MariaDB’s exact generated JSON_VALID constraint is
treated as the JSON alias. New native and Iceberg columns use VARIANT;
existing TEXT columns keep their type. Ordinary LONGTEXT stays text.
See MariaDB JSON mapping for refresh and resync rules.
Object, array, string, number, Boolean, and null
JSON roots are carried as validated JSON text and restored as VARIANT;
JSON null remains distinct from SQL NULL.
Repair a PipelineWise-created managed v3 table
PipelineWise does not adopt arbitrary externally created tables or columns. Before upgrading a managed v3 table created by an earlier PipelineWise version, or after a coordinated DBA repair to such a table, inspect its parameter and column widths:
SHOW PARAMETERS LIKE 'ICEBERG_MERGE_ON_READ_BEHAVIOR'
IN TABLE <database>.<schema>.<table>;
SELECT COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH
FROM <database>.INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = '<schema>'
AND TABLE_NAME = '<table>'
ORDER BY ORDINAL_POSITION;
PipelineWise requires value DISABLED at level TABLE; inherited values do
not qualify. Every string row must also report CHARACTER_MAXIMUM_LENGTH
134217728. Singer and FastSync reject the table before writing when either
contract fails. Set the parameter and widen each narrower string column before
starting PipelineWise:
ALTER ICEBERG TABLE <database>.<schema>.<table>
SET ICEBERG_MERGE_ON_READ_BEHAVIOR = 'DISABLED';
ALTER ICEBERG TABLE <database>.<schema>.<table>
ALTER COLUMN <column> SET DATA TYPE VARCHAR(134217728);
PipelineWise does not widen existing Iceberg columns automatically. Use a role authorized to repair the existing PipelineWise-created table, or recreate it through PipelineWise FullSync or the supported native-to-Iceberg converter, then retry the same operation. Do not introduce a new table or column through DBA DDL.
The change affects future Snowflake DML only; it does not rewrite the current snapshot or remove deletion vectors already referenced there. If the current snapshot must be deletion-vector-free, follow the change with a complete FullSync or controlled full-table replacement. PartialSync is insufficient. Historical snapshots and files can remain until retention cleanup. See Snowflake’s ALTER ICEBERG TABLE reference.
FullSync publication
FastSync always exports into a uniquely named native staging table. PipelineWise then chooses one Iceberg publication method:
Target state |
Method |
Effect |
|---|---|---|
Missing |
Explicit-schema CTAS |
Creates a managed Iceberg v3 table from staging. |
Exactly compatible |
|
Preserves the existing table object and its metadata. |
New nullable columns only |
Add columns, then |
Preserves the object and adds the compatible schema. |
Other compatible-format mismatch |
Guarded replacement CTAS |
Replaces the table only after metadata safety checks. |
FullSync supports tables without a primary key. Where one exists, PipelineWise
preserves composite primary-key order and its Iceberg identifier fields, and
rejects NULL key values.
After a successful initial load, LOG_BASED and INCREMENTAL tables continue with
Singer in the same run_tap invocation, using the same managed-v3 contract.
A guarded replacement preserves explicit grants and table tags through Snowflake copy clauses, then restores table and column comments. It fails before replacement when visible dependent streams, secondary constraints, inbound foreign keys, masking or row-access policies, direct column tags, defaults, identity columns, or clustering are present. The current owning account role must run the replacement, so ownership is retained; database-role ownership is not supported. The new object resets table history and can change its base location. Account-wide stream inspection is limited to dependencies visible to that role, so the role must be able to see every relevant dependency.
PartialSync publication
A missing Iceberg target is created from the selected range. An existing compatible target is updated through one transaction. PartialSync requires a primary key and physically deletes target rows missing from the source range.
Compatible nullable columns are added before the merge. Any other schema or key
mismatch fails before DML. Setting drop_target_table: true explicitly selects
replacement CTAS and leaves the table containing only the selected range.
Before normal or recovered publication, PipelineWise validates the canonical post-transformation staging projection. Every composite primary-key component must be non-NULL and every composite key group must be unique. A violation blocks new publication DML; PipelineWise does not deduplicate staging or choose a winning row. If an already-submitted attempt fails this recheck, its outcome remains ambiguous and PipelineWise preserves the manifest and staging table for manual recovery.
See PartialSync behaviour for boundaries, delete behaviour, and operational checks.
Concurrency and recovery
PipelineWise holds a process lock for the complete Iceberg attempt and rejects a changed target before publication. The lock coordinates only processes sharing the generated runtime directory; enforce the sole-writer requirement across other deployments and systems operationally.
Each FastSync attempt has a credential-free
iceberg-recovery-<hash>.json stream manifest and
iceberg-fastsync-target-<hash>.json target pointer in the generated target
runtime directory at $PIPELINEWISE_CONFIG_DIRECTORY/<target_id>/. A stable
source-stream identity finds the attempt after target-mapping changes, while the
target pointer prevents another source from starting against the same physical
table. PipelineWise also holds a physical-target lock. Recovery is bound to the
tap ID, source route and table, source endpoint and extraction settings, target
mapping and account/user/role, staging configuration, and transformation
contract. Passwords, private keys, and raw transformation rules are not stored.
The manifest records prepared, uploaded, staging_created, staged,
submitted, published, and finalized progress, including the saved
source boundary, staging identity, expected schema and content fingerprint,
publication identity, and completed finalization actions. PipelineWise advances
Singer state only after publication, metadata and grants, S3 cleanup, and staging
cleanup succeed. An interrupted additive change can leave a retry-safe nullable
column while target data and state remain unchanged.
If a connection fails after submission, new target data may be visible while state remains unchanged. Restart the same command without editing state, removing staging, or deleting either recovery file. Use the same generated runtime directory, tap ID, route, source table, target mapping, account/user/role, staging configuration, and transformation contract.
Recovery from completed staging publishes and hands over the saved bookmark without reconnecting to the source. It does not recheck the source engine or physical server identity. Resolve pending recovery before replacing or repointing the source server, even when the replacement uses the same engine.
For MySQL/MariaDB attempts that need re-export, a manifest without a saved source engine stops recovery. This can occur with manifests created before engine binding was introduced. Finish the attempt with the PipelineWise version and configuration that created it before upgrading. Changing only the charset cannot supply the missing engine evidence. If the original version or source is unavailable, stop affected replication and arrange a recovery plan after inspecting the publication state. Preserve the manifest, target pointer, state, and remaining staging evidence; do not delete recovery files or edit state to bypass the check.
MariaDB JSON attempts that need re-export also require the same recorded JSON alias mapping. Finish affected pending attempts before upgrading from a release that did not record it. If recovery stops, preserve its files and staging evidence and follow the recovery guidance above. Completed staging keeps its saved column types and can resume without rediscovering the source.
For CTAS and INSERT OVERWRITE, PipelineWise polls query history every five
seconds for up to 900 seconds by default. Set the positive integer
iceberg_query_history_poll_timeout_seconds in the Snowflake target’s
db_conn to change that budget. Each lookup scans at most 10,000 visible
queries from five minutes before the persisted submission time, including an
active publication. Connector timeouts are best-effort, so an individual
Snowflake call can make the observed wall-clock duration exceed the nominal
budget. PipelineWise requires the exact attempt, verifies the target, resumes
unfinished finalization, and then performs the saved state handover.
Query-history visibility can lag. For an ambiguous PartialSync commit, PipelineWise replays the persisted range transaction deterministically instead of resolving its boundaries again. Retry the same command if evidence is not yet terminal and while Snowflake retains the Information Schema query history. The polling budget is not part of recovery identity, so it can be increased for that unchanged retry. If the result remains ambiguous, PipelineWise preserves the evidence and fails for operator inspection.
Convert a tap’s tables automatically
To move a tap that already replicates into native tables:
Run the feasibility report while the tap still replicates natively, and resolve the blockers it shows. Use
--conversion-warehouseto keep the report’s scans off the loading warehouse. The report does not requirenative_to_iceberg_conversion.Pause the tap’s schedule and wait for its current run to finish. Set the Iceberg format and run
import_config. Keepnative_to_iceberg_conversionomitted or disabled while checking feasibility. Run the report again with the catalog conversion will use. The report also checks MariaDB JSON column types against imported transformations. Ifimport_configfails, fix the error and run it again: while the catalog is older than the imported settings, the report andrun_taprefuse to convert. Keep the tap paused in this state, because both writers refuse native tables under the Iceberg format. Keep the pause short: the source keeps accumulating changes.Resolve the report’s blockers. If only sub-microsecond values block it, you may accept the documented truncation and set
automatic_preflight: falseexplicitly. Stop readers and external writers of every table being converted. Setenabled: trueand runimport_config. While the schedule stays paused, runpipelinewise run_tap --target <target_id> --tap <tap_id>under supervision. Conversion runs first, then replication starts in the samerun_tap. There is no pause for independent validation. Validate the result before restoring readers, external writers, or the schedule. If you need independent validation before PipelineWise writes to Iceberg, use the manual--eventual icebergcommand while the tap remains stopped.
When other taps under the same target write some of the same tables, move them
together. Pause all of them, and run steps 1 and 2 for each. Each tap’s report
then also shows that the others do not enable native_to_iceberg_conversion;
fix every other blocker. Set enabled: true for all of them in one
import_config while they stay paused: enabling changes nothing until
run_tap runs. Run each report again, stop readers and external writers,
then run each tap under supervision. Validate the converted tables before
restoring readers, external writers, or schedules. You can accept a
precision-only blocker as described in step 3.
If you cannot resolve the report’s blockers or accept precision loss during the
pause, return the tap to native. Remove target_table_format,
iceberg_version, and native_to_iceberg_conversion, run
import_config, and resume the schedule. This is safe while no table has
converted and no conversion is pending. To clear a TEXT/VARIANT blocker, see
Clear a TEXT/VARIANT blocker.
target: "snowflake"
target_table_format: iceberg
iceberg_version: 3
data_flattening_max_level: 0
native_to_iceberg_conversion:
enabled: true
automatic_preflight: true # default; check all native tables before new conversions
conversion_warehouse: CONVERSION_WH # optional; defaults to the target's warehouse
Every run_tap for the tap then runs a conversion step inside the tap’s
pidfile, before FastSync or Singer writes anything:
It plans each selected stream’s Snowflake table and classifies them all with one
SHOW TABLESper schema and the target’s recovery manifests.It resumes every pending
--eventual icebergconversion of these tables first, starting with interrupted cutovers, and tries every one even when one fails. If another check would stop a table, the resume restores its name and then stops before another cutover. A resumed attempt passes the same checks as a new one, including the tap catalog’s column classes, before its cutover.It stops if any table needs an operator. By default,
automatic_preflight: truechecks every native table and stops before starting new conversions if any is blocked. This includes nullable primary-key columns containing SQLNULLand temporal values with sub-microsecond precision. These scans can read the whole table and consume warehouse resources. Setautomatic_preflight: falseexplicitly to skip preflight. When several streams write one table, every stream’s blockers and column classes count. Streams that disagree on a column’s class block the table.It converts the native tables one at a time, smallest first, with the same converter as
copy_native_to_iceberg --eventual iceberg. Every conversion still checks the table’s structure and copied contents before cutover. Conversion truncates excessTIMEand timestamp precision to six fractional digits.When it resumed or converted anything, it checks that every planned table is now new or Iceberg with no pending manifest. Then replication starts.
After the last table converts, each run costs one SHOW TABLES per schema,
and runs with FastSync work list those schemas once more before FastSync starts.
Enabling the setting needs a tap that can write managed Iceberg v3 through
target-snowflake, and data_flattening_max_level: 0, because conversion
compares native columns with the tap catalog’s top-level properties.
run_tap also stops before any Snowflake work if the tap’s generated
configuration is not imported with these settings, for example after an
import_config --taps run that did not include the tap.
conversion_warehouse runs only the conversion queries on another warehouse,
which the target role must be able to use. It is not part of the recovery
identity, so a manual copy_native_to_iceberg on the target’s warehouse can
resume an automatic attempt.
Conversion refuses a native table that another imported tap also writes,
unless that tap is under the same target, writes managed Iceberg v3, and also
enables native_to_iceberg_conversion. Such a tap’s run finishes or waits for
the table’s conversion before its writers start. Any other tap could write
during the copy or create an empty table while the name is absent, and a native
tap would fail on the converted table. Taps under other targets with the same
account and dbname count too and always stop the table, because two
targets cannot coordinate a conversion. Conversion also refuses a table whose
_NATIVE or _ICEBERG name is another tap’s destination. Move every tap
that writes a table to Iceberg v3 with conversion enabled together, or stop the
other taps writing it. Writers outside PipelineWise are not visible: stop them
before you enable the setting.
Check each table before you enable the setting, because conversion runs unattended:
Preflight sees only the policies, tags, and streams that the target role can see. Make sure that role can see all of them on the tap’s tables, and that no masking or row access policy hides rows from it.
Replaying grants and tags needs
APPLYon each direct table tag and, in a managed-access schema, ownership of the schema orMANAGE GRANTS. A missing privilege fails after the copy, and every run stops at the same statement until it is granted.Conversion does not carry over search optimization or data metric functions. The Iceberg table keeps one day of data retention. Dynamic tables and materialized views that read the table are not recreated; check them after the conversion.
Keep readers stopped through cutover and validation. Each table’s name is
briefly absent between two renames, so a concurrent reader would fail. A large
table converts within one tap run and holds the tap for the copy; use the
report’s row and byte counts to plan the outage.
Each conversion statement must finish within Snowflake’s statement timeout:
the lowest non-zero STATEMENT_TIMEOUT_IN_SECONDS of the conversion warehouse
and of the target user, which can also come from the account. This covers the
copy and the full-table scans that check it. Otherwise every run repeats the
statement that timed out and times out again.
If any table cannot convert, the run fails before replication starts, sends the
tap’s alert, and exits 1. It never falls back to native tables. Tables converted
earlier in the run stay converted, each validated with its native backup kept
as <table>_NATIVE. Pause the tap’s schedule until you have fixed the cause:
each scheduled run retries the conversion. By default,
automatic_preflight: true checks every native table before starting new
conversions. Pending attempts resume first, so a failed copy can retry without
a fresh preflight. Use the manual feasibility report to diagnose data blockers; see
Automatic native-to-Iceberg conversion stopped. While the tap is stopped, its
source keeps accumulating changes, so watch PostgreSQL WAL and MySQL binlog
retention.
Warning
Finish or recover every pending conversion before you set
enabled: false, remove native_to_iceberg_conversion, change the tap’s
format, deselect a stream, change its schema mapping, or remove the tap.
run_tap resumes only the conversions of the tables it plans, and only while
the setting is enabled. Otherwise a writer could create an empty table under a
primary name that an interrupted cutover left absent. Finish any other pending
conversion with copy_native_to_iceberg --eventual iceberg, adding
--conversion-warehouse to keep it off the loading warehouse. That command
does not check other taps that write the table.
Once a table has converted, the tap cannot return to native: the native
contract refuses Iceberg tables.
Convert a native table
The PipelineWise-owned command builds and validates one managed Iceberg v3 copy using an imported Snowflake target:
pipelinewise copy_native_to_iceberg \
--target <target_id> \
--table <database.schema.table> \
--eventual native \
--iceberg-version 3 \
--conversion-warehouse CONVERSION_WH
--eventual defaults to native. The command converts one table in the
target’s configured database. --tap is accepted only by the feasibility
report below. --conversion-warehouse is optional and applies to both
conversion and --preflight-only. Without it, manual conversion uses the
target’s warehouse. The target role must be allowed to use the chosen warehouse.
If imported taps that write the table map a column to different
TEXT/VARIANT classes, the command refuses the table; it first restores
the name of an interrupted cutover.
Mode |
Primary name after success |
Companion |
|---|---|---|
|
Original native |
Validated |
|
Promoted Iceberg |
Original |
The _NATIVE and _ICEBERG suffixes are reserved. Rename independently
managed objects with those names before conversion. Automatic conversion blocks a
table whose companion name is another selected stream’s table, or whose own name
ends with _NATIVE or _ICEBERG while the base table exists. The PipelineWise-owned
command is the only supported native-to-Iceberg converter; the old connector-local
copy-native-to-iceberg executable has been removed.
Warning
Complete or manually reconcile any interrupted connector-local conversion
before upgrading. The PipelineWise-owned command cannot adopt the old
unmanifested state when the primary name is absent and _NATIVE plus
_ICEBERG objects remain. Reinstall or recreate the target-snowflake
environment during deployment; a source-only update can leave a stale
generated console wrapper that no longer has a Python implementation.
Conversion feasibility report
Run copy_native_to_iceberg --preflight-only with --tap or --table
before converting anything. It takes no lock, writes no manifest, and runs no
DDL, so it is safe to run beside the tap. It checks metadata and reads data from
the existing native Snowflake tables, not the PostgreSQL or MariaDB/MySQL source.
Run this report manually before enabling automatic conversion to plan the work
and resolve blockers. Automatic conversion repeats preflight by default before
starting new conversions. Set automatic_preflight: false explicitly to skip
that preflight. A manual report can become stale if the table changes. Each
conversion repeats structural and copied-content checks, but does not repeat the
primary-key NULL or temporal precision scans itself.
For each native table with a primary key, preflight scans its nullable key
columns for SQL NULL. A row with NULL in any component of a composite key
blocks readiness and automatic_preflight: true before new conversions start.
Correct the affected native data or reload the table from a corrected source,
then run the report again. Conversion does not repair or discard these rows.
For each table with TIME, TIMESTAMP_NTZ, or TIMESTAMP_LTZ columns,
preflight also counts values with sub-microsecond precision. Their declared
types alone cannot show whether conversion will truncate any values. Such values
block the report and automatic_preflight: true before new conversions start.
A report blocked only by sub-microsecond values can still be converted with
deliberate truncation: set automatic_preflight: false explicitly for
run_tap, or run a manual conversion. Structural blockers still stop conversion.
The primary-key NULL and temporal precision checks share one aggregate query
per table. Metadata checks use separate queries. The data query does not sample
rows and may scan the relevant columns across the whole table, so preflight can
take time and consume warehouse resources. Full-row content comparisons happen
later, during conversion. Preflight queries run on
--conversion-warehouse when you give one. Otherwise --tap uses the tap’s
conversion_warehouse, and --table uses the target’s warehouse. It uses
the same table planning and checks as conversion. Each table gets one state:
State |
Meaning |
|---|---|
|
The table does not exist; the writers create it as Iceberg. |
|
The table is already Iceberg; nothing to convert. |
|
The table would be converted. Any preflight blockers are listed. |
|
An |
|
The table needs an operator first, for example a leftover |
For --tap, PipelineWise derives each table name the way target-snowflake
does, from the stream ID and the tap’s schema mapping. For MariaDB, MySQL, and
PostgreSQL taps it also derives the FastSync name, and blocks a stream whose two
names differ. Recognized MariaDB JSON columns can keep their existing TEXT
or VARIANT class. If an imported transformation needs the JSON as text,
preflight requires that column to already exist as TEXT. A missing column
or another type blocks conversion. Conversion preserves the physical type;
every tap writing a shared column must accept it. Other
TEXT/VARIANT mismatches remain blockers.
PostgreSQL taps can pass preflight before Iceberg settings are imported.
The report lists the required configuration changes as next steps, which do not
block readiness. native_to_iceberg_conversion can be omitted; an explicit
enabled: false is not required. Automatic conversion still requires the Iceberg
settings to be imported first.
MySQL/MariaDB taps need a catalog refreshed with the current JSON discovery.
Run import_config and rerun the report; the tap can remain configured as
native for this check. Discovery records evidence for each stream, including
tables without JSON columns. Missing evidence blocks readiness because an older
catalog cannot distinguish a MariaDB JSON alias from ordinary text. It does not
mean a column mismatch was found. See MariaDB JSON mapping.
The report also requires data_flattening_max_level: 0, and a catalog that the
last import_config rediscovered. --table checks one table against the catalogs
of the imported taps that write it, but skips the tap-wide checks. A manual
copy_native_to_iceberg conversion applies the same column compatibility rules
before copying. For a tap that flattens deeper than
level 0, the checks skip each object that the tap writes as child columns.
For each table, the report lists the first metadata refusal, such as a policy or
a stream. A table without a refusal lists every conversion blocker instead, such
as a TIMESTAMP_TZ column or a grant that cannot be replayed. A refusal hides
the remaining refusals and every conversion blocker, so run the report again
after each fix. Row and byte counts come from SHOW TABLES and help estimate
the copy time and warehouse cost. The
--tap report also blocks a table that another imported tap writes, by the
same rules as automatic conversion.
Clear a TEXT/VARIANT blocker
Conversion preserves a column’s class. Recognized MariaDB JSON columns without text-dependent transformations may remain TEXT or VARIANT. For other columns, the existing class must match what every writer accepts. A TEXT/VARIANT conflict stops conversion before copying.
First refresh the catalog with import_config. If the conflict remains,
review the source type and every tap writing the table. A MariaDB JSON field
used by a string transformation needs an existing TEXT column. If it is missing,
remove or change the transformation to one that can write a new VARIANT column,
then run import_config and preflight again.
With the tap paused and its Iceberg settings imported, a column that genuinely needs VARIANT can be migrated in one of two ways:
Rebuild the column as
VARIANT:ALTER TABLE <table> ADD COLUMN <column>__variant VARIANT; UPDATE <table> SET <column>__variant = PARSE_JSON(<column>); ALTER TABLE <table> DROP COLUMN <column>; ALTER TABLE <table> RENAME COLUMN <column>__variant TO <column>;
Use
PARSE_JSON, notTRY_PARSE_JSONorTO_VARIANT. Invalid text then fails instead of becomingNULL, and a JSONnullstays distinct from SQLNULL. Restore the column comment if it had one, then run the report again.Rename the native table to a name without the reserved
_NATIVEand_ICEBERGsuffixes, then reload it withfast_sync --tables <schema.table>. FastSync creates the table as Iceberg, but it does not carry over explicit grants, tags, or comments.
Conversion preflight and metadata
Before conversion:
stop PipelineWise replication and every other writer to the table before conversion starts;
record source and target evidence plus required metadata;
use the current owning account role, with access to unmasked source rows and all relevant metadata;
confirm the role can create, alter, rename, grant, tag, and comment; and
for
eventual=iceberg, also stop every reader, including dashboards, transformations, and ad-hoc queries, before cutover; andkeep readers and external writers stopped until the result is independently validated. With manual conversion, keep PipelineWise stopped too. Automatic
run_tapstarts replication immediately after its built-in conversion checks.
The command compares row count and HASH_AGG evidence before cutover. It
copies every row through the required type projection, including duplicate-key
and other representable flawed data, without filtering, deduplication, or
repair. TIME, TIMESTAMP_NTZ, and TIMESTAMP_LTZ values are explicitly
truncated to six fractional digits before the Iceberg write. The evidence
compares this projected source with the destination; the retained native backup
keeps the original values. It preserves other supported types, nullability,
primary-key order, table and column comments, explicit non-ownership grants to
account roles and qualified database roles, grant options, and direct table
tags. The current account role must own the native source; database-role
ownership is not supported.
Ownership, comments, and direct table tags must match exactly. Every native grant must also be present on the Iceberg table, so no reader loses access. Extra grants on the Iceberg table, for example from future grants or scheduled grant automation, are logged and accepted.
Conversion fails before copying when the table has visible dependent streams, policies, direct column tags, secondary constraints, inbound foreign keys, defaults, identity columns, a clustering key, or an unsupported Iceberg type. Account-wide stream inspection is limited to objects visible to the current role. It also fails before copying when a type cannot be represented by the conversion projection or grants cannot be replayed:
a
TIMESTAMP_TZcolumn, because managed Iceberg storesTIMESTAMP_LTZand would drop each value’s offset;a grant of a privilege that Iceberg tables do not accept, or a grant to anything other than an account role or a qualified database role.
Snowflake now supports nanosecond TIMESTAMP_NTZ(9) and TIMESTAMP_LTZ(9)
columns in Iceberg v3, but PipelineWise still uses precision 6. TIME maps to
TIME(6). See Snowflake’s supported Iceberg types.
Conversion always removes any sub-microsecond digits. Preflight reports values
that would change, and automatic_preflight: true stops before a new
conversion when it finds them. For example, .123456999 becomes .123456;
.999999999 becomes .999999 without carrying into the next second.
Snowflake VARIANT remains VARIANT.
Writes during the copy or cutover can be absent from the Iceberg result. The
local manifest lock does not replace the required external writer exclusion.
For eventual=iceberg, promotion renames <table> to <table>_NATIVE
and then renames <table>_ICEBERG to <table>. These are independent
statements: the primary table name is absent between them, so concurrent readers
fail instead of seeing stale data. Rollback has the same availability gap in
reverse. Use eventual=native when a reader outage is not acceptable.
Interrupted conversion
Retry from the same imported target runtime directory with the same table,
--eventual value, target account/database/user, and account role. The command
reuses its durable manifest, verifies companion-table state and contents, and
finishes a committed promotion or rollback. It never deletes the _NATIVE
rollback table.
An interruption after the first promotion or rollback rename can leave the
primary name absent until recovery runs. A retry first renames
<table>_NATIVE back to <table>, so the name returns before any
validation scan. It then validates the companion again and repeats the cutover.
Keep the reader-and-writer outage in place and retry the identical command
immediately. Do not resume readers merely because writers are stopped.
After promotion, PipelineWise first proves that the promoted table’s columns and
rows still match the _NATIVE backup and the staged evidence. Then it checks
the Iceberg table settings and metadata:
Result |
Outcome |
|---|---|
Columns, rows, and metadata match |
The conversion finishes and the manifest is removed. |
Columns or rows differ |
The promoted table stays live and the manifest is kept. The command fails for inspection. PipelineWise never renames away a table that may have received writes. Iceberg FastSync refuses the table until you resolve it; see Native-to-Iceberg contents changed after cutover. |
Columns and rows match, but the Iceberg table settings or metadata differ |
PipelineWise records rollback intent, restores the native table name, and keeps the manifest. A retry cuts over again once the difference is fixed. An extra grant on the promoted table is not a difference; a missing native grant is. |
A connection or other unexpected error |
The promoted table stays live and the manifest is kept. Retry the identical command to finish validation. |
A pending rollback also proves that the promoted columns and rows still match
before it renames anything. If they differ, it stops in the same way as the
“Columns or rows differ” row. After promotion, PipelineWise never restores
<table>_NATIVE on its own: if the promoted table is missing, the command stops
for manual recovery, because the backup may be older than the promoted table.
A rerun after a completed --eventual iceberg conversion changes nothing. It
confirms that <table> is a managed Iceberg v3 table and keeps
<table>_NATIVE. A table that was created as Iceberg has no native table to
convert, so the command refuses it.
If the primary and companion names cannot prove one safe state, the command fails. Inspect all three tables and the manifest before changing anything manually.
Validation
Before restoring readers or external writers, compare exact primary-key coverage
or a deterministic checksum, critical values, physical format and version,
ownership, grants, tags, comments, and downstream access. Automatic run_tap
has already started replication after its built-in checks. For
eventual=iceberg, retain _NATIVE until at least one Singer or FastSync
cycle and independent reconciliation have succeeded.