
Overview
By default, Prequel queries rows from your source and writes them to the destination. This page calls that logical replication. Physical replication instead copies an Apache Iceberg table’s data files to the recipient’s bucket and commits matching Iceberg metadata. Rows are never queried or rewritten, so throughput depends on how fast files can be copied between buckets. Because files are copied as-is, every column keeps its source type, including decimal precision and scale. This also delivers types that logical replication does not support, such as string arrays.Higher throughput
No queries against your source
Hard deletes are propagated
Open format for recipients
Comparing logical vs physical replication
How physical replication in Prequel works
Each transfer of a physically replicated model runs the following steps:- Read the table metadata. Prequel reads the source table’s current snapshot (its latest version) from your Iceberg catalog. The snapshot lists every data file and delete file in the table.
- Filter by recipient. Prequel keeps only the files in partitions that belong to the recipient. Files in other recipients’ partitions are never copied.
- Copy new files. Prequel copies the files that the destination does not already have. On incremental transfers, files copied by earlier transfers are skipped.
- Commit to the destination. Prequel updates the Iceberg metadata to point at the destination bucket and commits it to the destination catalog as a new snapshot. Recipients see the new data all at once, after the commit succeeds.
Requirements
- The model’s source is an Apache Iceberg source, and the destination is an Apache Iceberg destination.
otf_acceleration_enabledis set totrueon both the model and the destination. A model with physical replication enabled can only be transferred to destinations that also have it enabled.- The model reads from a
source_tablethat is an Iceberg table. Views are not supported. - The model still defines
columns, including a primary key column and a last-modified column, like any other model. Prequel checks that the model is well-formed, but does not validate it against the source table. Thecolumnslist does not control which columns are delivered. See Limitations. - Multi-tenant source tables are partitioned by the model’s
organization_column. See Limitations.
How to enable physical replication
Physical replication uses the same sources, models, products, recipients, and destinations as any other transfer. You enable it with one setting on the model and one on the destination, both set through the API.Connect your Iceberg source
Prepare the source table
Check your existing destinations
all product has a destination without physical replication that uses "enabled_models": ["*"] (All current and future models in the Prequel UI). Update those destinations to an explicit list of models first. Otherwise, the model in the next step cannot be created. See Guardrails.Create the model
source_table, and set otf_acceleration_enabled to true. Use the Create model endpoint.If a model for this table already exists, create the new model alongside it with a different model_name. Two models that reach the same recipient cannot write to the same table name.Create the destination
otf_acceleration_enabled set to true using the Create destination endpoint.To migrate an existing recipient, add this as a second destination on the same recipient and run it in parallel with their current destination. The current destination must not use "enabled_models": ["*"]. See Guardrails.Add the model to a product and transfer
otf_acceleration_enabled cannot be changed after a model or destination is created. To move an existing model or destination to physical replication, create a new one with the setting enabled.Supported catalogs and query engines
Sources
Prequel reads source tables from the catalogs supported by the Apache Iceberg source:- AWS Glue Catalog
- AWS S3 Tables Catalog
- Iceberg REST Catalog
Destinations
Each recipient receives an Iceberg table in their own bucket and catalog, using any catalog supported by the Apache Iceberg destination. Recipients can query the delivered table from any query engine or system that reads Iceberg tables from that catalog, for example Amazon Athena, Amazon Redshift, Snowflake, BigQuery, ClickHouse, DuckDB, MotherDuck, and Spark.Limitations
- Every column in the source table is delivered, with its source name and type. The model’s
columnslist,name_in_destinationvalues, anddata_typevalues are not applied.- What this means: do not enable physical replication on a table that contains columns you do not want to share.
- The source table must be partitioned by your organization column. Prequel copies only the files in partitions where the model’s
organization_columnmatches the recipient.- What this means: partition the table directly on that column (an identity partition) before enabling physical replication. A file is copied only when its partition value exactly equals the recipient’s
id_in_provider_system. - Files that Prequel cannot match to the recipient are never copied. This is intentional, so that a table with missing or incorrect partitioning cannot expose one recipient’s data to another. In that case, transfers succeed but deliver no rows.
- What this means: partition the table directly on that column (an identity partition) before enabling physical replication. A file is copied only when its partition value exactly equals the recipient’s
- A recipient’s partitions must have no delete files before a model’s first transfer to that recipient’s destination and before any full refresh. Those transfers fail otherwise. Delete files in other recipients’ partitions do not affect the transfer.
- What this means: compact the recipient’s partitions in your query engine first. You do not need to compact the whole table to add a new recipient. See Do I need to compact the source table?
- Source queries are not supported.
- Windowed transfers are not supported.
- Row filters are not supported. Recipients are separated only by partition, and Prequel does not filter rows within a data file.
- Partition evolution is not supported. Data files written before the table was partitioned by your organization column are not delivered.
Guardrails
To ensure a model with physical replication enabled is never sent to an incompatible destination, Prequel enforces the following:- Physical replication cannot be enabled or disabled on an existing model or destination. New resources are strictly required and the field is immutable after creation.
- A model with physical replication enabled can only be transferred to a destination that also has physical replication enabled.
- You cannot use
"enabled_models": ["*"](All current and future models in the Prequel UI) on a destination without physical replication if its recipient’s products include a model with physical replication enabled. This applies to every recipient subscribed to theallproduct.- What this means: before enabling physical replication for a customer, ensure their current destinations are not using
"enabled_models": ["*"], and update them if they are. - While any recipient subscribed to the
allproduct has such a destination, new models with physical replication enabled cannot be created. This check covers every recipient in your account, not only the customer you are enabling.
- What this means: before enabling physical replication for a customer, ensure their current destinations are not using
FAQ
Does physical replication use the same recipients, products, and transfers as logical replication?
Does physical replication use the same recipients, products, and transfers as logical replication?
Are full refreshes supported?
Are full refreshes supported?
Can I mix physically replicated models with other models?
Can I mix physically replicated models with other models?
source_table without the setting.Can I switch an existing model or destination to physical replication?
Can I switch an existing model or destination to physical replication?
otf_acceleration_enabled set to true.How does Prequel detect changes without querying the table?
How does Prequel detect changes without querying the table?
last_modified_at column. Physical replication compares files. Each transfer copies only the data files the destination does not already have, then commits a snapshot that matches the source.Are deletes in the source table replicated?
Are deletes in the source table replicated?
Do I need to compact the source table?
Do I need to compact the source table?