-
Notifications
You must be signed in to change notification settings - Fork 334
Open
Description
Feature Request
Add support for cron_tz in the model_defaults section of config.yaml to allow setting a default timezone for all models in a project.
Use Case
In projects where all models use the same timezone for cron scheduling, it's repetitive and error-prone to specify the timezone in every individual model definition. A project-wide default would significantly reduce configuration duplication and maintenance overhead.
Current Behavior
Currently, cron_tz must be specified in each individual model's MODEL() definition:
MODEL (
name my_schema.my_model,
cron: '0 * * * *',
cron_tz 'Europe/London',
);
When attempting to set it in model_defaults, SQLMesh returns an error:
Error: 'cron_tz' is not a valid model default configuration key.
Please remove it from themodel_defaultsspecification in your config file.
Desired Behavior
Allow cron_tz to be specified in model_defaults:
model_defaults:
dialect: trino
start: '2025-01-01'
kind: VIEW
cron: '0 * * * *'
cron_tz: 'Europe/London' # Should be valid here
interval_unit: 'hour'
coshy0163
Metadata
Metadata
Assignees
Labels
No labels