deployment.yml
File
Overview
The deployment.yml
file allows you to do the following:
- Manage versions of your Fivetran Transformations for dbt Core.
- Define jobs, which can contain one or more steps and run on upstream connector-integrated or cron-based schedules. Each job step contains one or more dbt commands.
How to use deployment.yml
file
Create a new file called deployment.yml
in the root of your dbt project and specify the relevant parameters and values. You can use the example we provided as a template.
The following parameters are supported:
name
- The string specifying the job name. Each job must have a unique name. The name is displayed in the Fivetran dashboard once your jobs are imported.schedule
- For Cron scheduling, use cron format. If you want to use Integrated scheduling, specify the nestedtype
andintegrations
objects.type
- The string defining the schedule type. For cron scheduling, specifytype: cron
. For integrated scheduling, specifytype: integrated
.entries
- The list of cron schedules if the scheduling type is cron (type: cron
). Cron scheduling supports multiple schedules in an array format, for example,entries: ["0 */1 * * *", "30 */5 * * *"]
.integrations
- The list of IDs of upstream connections you want to use with integrated scheduling (type: integrated
). An example:integrations: - abject_normative - prodigy_vaso
targetName
- The string specifying the transformation target. If it's not specified, the target will be named 'prod'.timeout
- The string specifying the timeout period after which the job is terminated. If this property is not specified, the job will be terminated after 24 hours. You can specify only hours, only minutes, or both, for example, "6h", "2h30m", "30m".steps
- The list of dbt job steps, each comprising one or more dbt commands.name
- The string defining the dbt job step name.command
- The dbt command in the step. The command includes names of data models on which the command is executed.
Example of deployment.yml
file
jobs:
- name: daily model runs
targetName: dev
schedule:
type: cron
entries: ["0 12 * * *"]
timeout: 2h30m
steps:
- name: run models
command: dbt run
- name: test models
command: dbt test
- name: refresh specific models nightly
schedule:
type: cron
entries: ["0 0 * * *"]
steps:
- name: run models
command: dbt run --select +my_first_model +my_second_model
- name: multiple steps in job
targetName: dev
schedule:
type: cron
entries: ["0 12 * * *"]
timeout: 2h30m
steps:
- name: try source freshness
command: 'dbt source freshness --select source:sqlserver'
- name: fully refresh this model
command: dbt run --select +employee_shifts --full-refresh
- name: test this models
command: dbt test --select +employee_shifts
- name: connector-integrated-schedule
schedule:
type: integrated
integrations:
- abject_normative
- prodigy_vaso
steps:
- name: run models
command: dbt run --models ...