Let's make it easy to add model defaults to different subfolders within a sqlmesh project. We have it at the project level and individual model level, but nothing in between. This will be helpful for granting permissions, grouping together pre/post-statements, etc.
Similar to this recent PR: #4995
Model config override behavior: model > subfolder > project
Quick and dirty mockup for config.yaml:
model_defaults:
dialect: duckdb
pre_statements:
- "SET timeout = 300000"
post_statements:
- "@IF(@runtime_stage = 'evaluating', ANALYZE @this_model)"
on_virtual_update:
- "GRANT SELECT ON @this_model TO ROLE analyst_role"
subfolder_a:
dialect: snowflake
pre_statements:
- "SET timeout = 200000"
subfolder_b:
pre_statements:
- "SET timeout = 400000"
Let's make it easy to add model defaults to different subfolders within a sqlmesh project. We have it at the project level and individual model level, but nothing in between. This will be helpful for granting permissions, grouping together pre/post-statements, etc.
Similar to this recent PR: #4995
Model config override behavior: model > subfolder > project
Quick and dirty mockup for
config.yaml: