Skip to content

twincommit ddl

twincommit ddl generates CREATE TABLE statements for the target from the source table definitions, using the data type mapping. By default it prints them; with -apply it runs them.

Terminal window
twincommit ddl -config pipeline.yaml # print
twincommit ddl -config pipeline.yaml -apply # create missing tables
Flag Description
-config Path to the pipeline file
-apply Execute the statements on the target
CREATE TABLE sales.orders (
order_id bigint NOT NULL,
customer_id integer NOT NULL,
status char(1) NOT NULL,
total numeric(12,2),
created_at timestamp(6) NOT NULL,
PRIMARY KEY (order_id)
);

-apply only creates tables that do not exist. You can create or adjust target tables yourself, as long as column names match.