Skip to content

Feat(dbt_cli): Use sqlmesh.yaml for config instead of trying to inject dbt_project.yml#5132

Closed
erindru wants to merge 1 commit intomainfrom
erin/dbt-cli
Closed

Feat(dbt_cli): Use sqlmesh.yaml for config instead of trying to inject dbt_project.yml#5132
erindru wants to merge 1 commit intomainfrom
erin/dbt-cli

Conversation

@erindru
Copy link
Collaborator

@erindru erindru commented Aug 12, 2025

No description provided.

@erindru erindru mentioned this pull request Aug 12, 2025
@erindru erindru marked this pull request as ready for review August 12, 2025 00:41
_inject_default_start_date(project_dir)
cli_config = get_or_create_sqlmesh_config(project_dir)
# todo: we will need to build this out when we start storing more than model_defaults
model_defaults = (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this alternative config here. It should be normal SQLMesh config.

Please note that despite having a separate CLI command I still want other sqlmesh commands to work as expected. The current direction doesn't ensure that

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with normal SQLMesh config is that it has fields and validations designed for normal SQLMesh projects, which includes a bunch of redundancy that is already specified in dbt_project.yml or profiles.yml in a dbt project (like the entire connection config).

It's also called config.yaml which is kind of generic next to dbt_project.yml instead of something more obvious like sqlmesh.yaml.

But i'll investigate how it can be re-used instead of defining a working subset tuned down to just what's required for the dbt-compatible CLI.

I still want other sqlmesh commands to work as expected

Understood, that helps a lot

@erindru
Copy link
Collaborator Author

erindru commented Aug 14, 2025

Closing in favour of #5156

@erindru erindru closed this Aug 14, 2025
@erindru erindru deleted the erin/dbt-cli branch August 20, 2025 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants