Deployment Options (Project)
Applies to
Platform: Microsoft SQL Server · Snowflake · Databricks · Fabric Lakehouse · Fabric Warehouse · Oracle
Deployment Options (DeploymentOptions) select which optional statements the generated deployment scripts contain. They decide whether a deployment drops and recreates tables and whether it creates schemas.
The dbt generators do not offer the property.
Values
Select one or more values in the Deployment group of the Additional Settings in Project Settings:
Generate Drop Table Statements: the table scripts drop and recreate each table. Without it, a table is created only when it does not exist. On Microsoft SQL Server, the option also adds the statements that drop the foreign keys referencing a table before it is dropped.Generate Drop Load Control Schema(Snowflake only): the load control deployment starts withDROP SCHEMA IF EXISTSfor the load control schema, withCASCADE.Generate Create Schema If Not Exists Statements(Databricks, Fabric Lakehouse): each layer header runsCREATE SCHEMA IF NOT EXISTS. It applies only with Use Unity Catalogtrueon Databricks and with Target PlatformFabricon Fabric Lakehouse. With Use Unity Catalogfalseor Target PlatformAzure Synapse, the header runsCREATE DATABASE IF NOT EXISTSinstead, whether the option is selected or not.Generate Alter View Body Statements(Databricks only): the deployment alters a view that already exists withALTER VIEWand creates it otherwise. Without it, views are created withCREATE OR REPLACE VIEW.

Defaults
- Microsoft SQL Server, Fabric Warehouse, Oracle:
Generate Drop Table Statements. - Snowflake:
Generate Drop Table StatementsandGenerate Drop Load Control Schema. - Databricks, Fabric Lakehouse:
Generate Drop Table StatementsandGenerate Create Schema If Not Exists Statements.
With Generate Drop Table Statements, the default on every platform, each deployment deletes the data in the generated tables. The table scripts drop an existing table and create it empty: DROP TABLE and CREATE TABLE on Microsoft SQL Server and Fabric Warehouse, DROP TABLE ... CASCADE CONSTRAINTS PURGE on Oracle, and CREATE OR REPLACE TABLE on Snowflake, Databricks and Fabric Lakehouse. Clear the option before you deploy to tables whose data you want to keep.
On Databricks and Fabric Lakehouse, the option also applies to the load control log tables execution_log and deployment_log: with it, the load control deployment replaces them with CREATE OR REPLACE TABLE; without it, the deployment creates them with CREATE TABLE IF NOT EXISTS. On Microsoft SQL Server, the load control tables do not depend on Deployment Options: with Deploy LoadControl true, each deployment drops and creates them again.
To deploy a changed project into a target that already holds data, follow Redeploy and keep data in the Deployment article of your platform: Microsoft SQL Server, Snowflake, Databricks, Fabric Lakehouse, Fabric Warehouse, Oracle.
Example
On Microsoft SQL Server without Generate Drop Table Statements, the table script of a Link starts with:
IF OBJECT_ID(N'[<schema>].[RDV_LNK_single_customer_hub_lnk]', N'U') IS NULL
BEGIN
CREATE TABLE [<schema>].[RDV_LNK_single_customer_hub_lnk] (
...
With the option, the script drops the table first and then creates it.
Release differences
- Generator 2.2:
Generate Create Schema If Not Exists Statementsis added. - Generator 2.0:
Generate Alter View Body StatementsandGenerate Drop Load Control Schemaare added.
Related articles
- Reference: Use Unity Catalog (Project), Target Platform (Project), Deploy LoadControl (Project)
- See also: Deploy a Project in production, Manage Project settings and Generator configuration