Skip to content

Commit 71c988f

Browse files
authored
DBT projects use python config file (#413)
1 parent 04bf185 commit 71c988f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

sqlmesh/cli/example_project.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ def init_example_project(
127127
path: t.Union[str, Path], template: ProjectTemplate = ProjectTemplate.DEFAULT
128128
) -> None:
129129
root_path = Path(path)
130-
config_path = root_path / "config.yaml"
130+
config_extension = "py" if template == ProjectTemplate.DBT else "yaml"
131+
config_path = root_path / f"config.{config_extension}"
131132
audits_path = root_path / "audits"
132133
macros_path = root_path / "macros"
133134
models_path = root_path / "models"
@@ -149,7 +150,7 @@ def init_example_project(
149150

150151
def _create_folders(target_folders: t.Sequence[Path]) -> None:
151152
for folder_path in target_folders:
152-
folder_path.mkdir()
153+
folder_path.mkdir(exist_ok=True)
153154
(folder_path / ".gitkeep").touch()
154155

155156

0 commit comments

Comments
 (0)