Skip to main content
sqb dbt clone populates a target with the already-built relations from your production baseline, without running dbt. It resolves the production-shaped relations the same way reuse does (by compiling your dbt project at the configured reuse_from git ref), then clones or copies each one into the target schema.
sqb dbt clone
sqb clone  origin=main destination=dev

  agg_daily_revenue    OK     copied
  dim_customers        OK     copied
  fct_orders           OK     copied
  ...

CLONED=0  COPIED=10  RECREATED_VIEWS=0  PASS=10  WARN=0  FAIL=0  TOTAL=10
The origin is the reuse_from.git_ref from your configuration; the destination is the active target. Where the warehouse supports zero-copy cloning, relations are cloned (CLONED); otherwise they are copied (COPIED). Views are recreated to point at the cloned relations (RECREATED_VIEWS). This differs from reuse from production, which runs as a pre-phase inside a build and only brings over the unchanged relations a build needs. sqb dbt clone is a standalone operation that populates the whole target (or a selected subset) up front.

Options

FlagEffect
--select / -sLimit to matching models (dbt selection syntax).
--excludeExclude matching models.
--hard-copyForce a full copy instead of a zero-copy clone, even where the warehouse supports cloning.
--no-sql-validationSkip SQL validation during the clone.
sqb dbt clone --select path:models/marts
sqb dbt clone --hard-copy

On this topic

  • Reuse from production - reuse unchanged relations as a build pre-phase.
  • Diff - compare a build against the production baseline.