diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index eae06741f..55042428b 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -42,9 +42,11 @@ jobs: - name: setup python uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - name: Install aspects - run: pip install . + run: | + pip install -r requirements/dev.txt + pip install -e . - name: Save config run: tutor config save - name: Setup Docker Buildx diff --git a/tutoraspects/asset_command_helpers.py b/tutoraspects/asset_command_helpers.py index ea006909a..2cf1f8b9c 100644 --- a/tutoraspects/asset_command_helpers.py +++ b/tutoraspects/asset_command_helpers.py @@ -7,6 +7,8 @@ import re import json from zipfile import ZipFile +from sqlfmt.api import format_string +from sqlfmt.mode import Mode import click import yaml @@ -212,6 +214,10 @@ def process(self, content: dict, existing: dict): if not metric.get("verbose_name"): metric["verbose_name"] = metric["metric_name"].replace("_", " ").title() + content["sql"] = format_string( + content["sql"], mode=Mode(dialect_name="clickhouse") + ) + class DatabaseAsset(Asset): """