Skip to main content

Sources and targets

Model sources and targets vary slightly from those of the pipeline. The primary difference is that all model sources and targets must point to tables in the SQL warehouse.

Sources

When you create a new model, you need to define an input data source. The data source can be:

  • Another model. You can drag a model from the Project tab of the left sidebar onto your canvas to use it as a source.
  • A Table gem. You can either use pre-configured tables from the Project tab of the left sidebar, or you can browse SQL warehouse tables in the Environment tab of the left sidebar.

Targets

Target models let you define how you want to materialize your data using write formats.

Target model tabs

When you open a Target model configuration, you'll see the following tabs:

  • Type & Format: Update the format of the model between different types of materializations
  • Location: Update the location by overwriting the Database, Schema, or Alias
  • Schema: Make schema changes
  • SQL Query: View and enable your custom SQL query
  • Write Options: Use Write Modes such as Overwrite, Append, and Merge

Target Model tabs

dbt advanced settings

You can find advanced settings are available for defining model write formats and other DBT options. These include all dbt native settings, traditionally accessible from the .yaml file.

To open dbt advanced settings, click ... > Advanced Settings. The object properties describe everything from physical locations, materialization logic, business metadata, and access control definitions.

Advance Settings

dbt properties mapping

The following table maps all of the dbt properties for Databricks and Snowflake to the tabs of Prophecy’s Target model:

dbt property nameProviderTarget model tab
file_formatDatabricksType & Format
aliasAllLocation
databaseAllLocation
location_rootDatabricksLocation
contractAllSchema
enabledAllSchema
schemaAllSchema
tagsAllSchema
cluster_bySnowflakeSchema
partition_bySnowflakeSchema
clustered_byDatabricksSchema
bucketsDatabricksSchema
transientSnowflakeSchema
query_tagSnowflakeSchema
automatic_clusteringSnowflakeSchema
snowflake_warehouseSnowflakeSchema
copy_grantsSnowflakeSchema
secureSnowflakeSchema
target_lagSnowflakeSchema
docsAllSchema
groupAllSchema
metaAllSchema
persist_docsAllSchema
full_refreshAllWrite Options
incremental_predicatesAllWrite Options
incremental_strategyAllWrite Options
materializedAllWrite Options
on_schema_changeAllWrite Options
merge_exclude_columnsSnowflake, SparkWrite Options
merge_update_columnsSnowflake, SparkWrite Options