Scheduling a dbt™ Project

Last updated on Aug 26, 2024

At this time, the dbt Coreā„¢ on Hevo is in BETA. Please reach out to Hevo Support or your account executive to enable it for your team.

The dbt project schedule defines the frequency at which models in your dbt project are run.

You can create a schedule for your dbt project to:

  • Run all the models in your project on the same schedule.

  • Run any model in your project on a separate schedule. This model must not depend on any other model in your project for input.

  • Run the entire project or each model in the project on-demand with the Run Now option.

    Run Project now


Creating the dbt Project Schedule

Perform the following steps to create a schedule for your dbt project:

  1. Click MODELS in the Navigation Bar.

  2. Select the dbt Core tab in the Models List View.

  3. Click the desired dbt project. This opens your project in its Detailed View.

  4. In the Summary Bar, click Set Schedule. To create a schedule for a specific model in your dbt project, select Set Schedule next to the model name.

    Set Schedule

  5. In the Schedule <dbt Project name> pop-up window, select one of the following scheduling options:

    • When relevant Pipelines load Events to the table: Run the project whenever data is loaded by a Pipeline to a particular table in the Destination. As loads can be very frequent, Hevo runs the dbt projects at the most once per hour.

      For example, as seen in the following image, the project dbtDVDRental is scheduled to run whenever a Pipeline loads Events to the customer table.

      Run when Events are loaded

    • Runs Every: Run the project at a fixed frequency. The highest frequency is 5 Mins and the lowest is 24 Hrs.

      Run every 24 hours

      Select Custom in the Runs Every option to define a specific time for the project run, and choose one of the options from the Run On drop-down:

      Custom scheduling

      • Fixed Interval of: Specify a time interval in hours, at which the project must run. If you manually run the project at any time, the schedule resumes from that time. Let us suppose you specify the interval as 4 hours, and as per that, the project is scheduled to run at noon, 4 PM (UTC), 8 PM (UTC), and so on. If you manually run the project between these times, say at 5 PM (UTC), then the next run happens 4 hours after that, at 9 PM (UTC) and not 8 PM (UTC).

      • Daily: Schedule the project to run daily at the specified time.

      • Weekly: Select the days of the week and the time when you want the project to run.

    • Cron Expression: Specify the time and date at which the project must run, in a string format. This expression must contain five fields, with each separated by a space to indicate the minute, hour, day of the month, month, and day of the week, respectively. Read CRONTAB for more information on cron. You can also use the Cron expression generator for creating cron expressions.

      In the sample image below, the expression 0 0 12 * * runs the dbt project at midnight on the 12th day of each month.

      Cron expresssion

  6. Click SCHEDULE to set up the schedule. This creates a schedule to run all the models in your dbt project. You can also create a schedule for a model in your dbt project by selecting Set Schedule next to the model name in step 4 above.

    Note: Setting a schedule at the project level overrides any previously created schedules for individual models.


Modifying the Schedule of your dbt Project

You can change the schedule of your dbt project for all the models or an individual model in the project.

Modify schedule

  • For all models: In the Summary Bar, click Edit Schedule and change the schedule.

  • For an individual model: In the List Area, click Edit Schedule next to the model and change the schedule.

    Note: The schedule of the entire dbt project is lost when you change the schedule of any individual model within in it.


Revision History

Refer to the following table for the list of key updates made to this page:

Date Release Description of Change
Aug-26-2024 NA Updated the page to reflect the latest Hevo UI.
May-23-2023 NA Updated the section, Creating the dbt Project Schedule to reflect the latest Hevo UI.
Nov-25-2022 NA New document.

Tell us what went wrong