Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sqlbuild.com/llms.txt

Use this file to discover all available pages before exploring further.

sqb clone

Copies model relations from one environment to another. Uses zero-copy cloning where the adapter supports it, falling back to physical copies with --hard-copy. No manifest.json generation or artifact management is required. Clone works directly against live environments.

Usage

sqb --project-dir <path> clone --from <env> --to <env> [flags]

Flags

FlagDescription
--fromSource environment (required)
--toTarget environment (required)
--hard-copyForce physical table copies instead of zero-copy cloning
--no-sql-validationSkip compile-time SQL syntax validation
--select, -sSelect specific models to clone
--excludeExclude specific models from cloning

Examples

# Clone all models from prod to dev
sqb --project-dir examples/waffle_shop clone --from prod --to dev

# Clone only marts to dev
sqb --project-dir examples/waffle_shop clone --from prod --to dev --select path:marts

# Force physical copies
sqb --project-dir examples/waffle_shop clone --from prod --to dev --hard-copy

Clone policies

Environments must allow cloning in sqlbuild_project.yml. See Project Configuration for details.