Skip to content

Commit

Permalink
Fix!: Automatically categorize python models by default (#3594)
Browse files Browse the repository at this point in the history
  • Loading branch information
izeigerman authored Jan 7, 2025
1 parent f1a2bb0 commit fe7d221
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/guides/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ With the example configuration above, SQLMesh would evaluate environment names a

SQLMesh compares the current state of project files to an environment when `sqlmesh plan` is run. It detects changes to models, which can be classified as breaking or non-breaking.

SQLMesh can attempt to automatically [categorize](../concepts/plans.md#change-categories) the changes it detects. The `plan.auto_categorize_changes` option determines whether SQLMesh should attempt automatic change categorization. This option is in the [environments](../reference/configuration.md#environments) section of the configuration reference page.
SQLMesh can attempt to automatically [categorize](../concepts/plans.md#change-categories) the changes it detects. The `plan.auto_categorize_changes` option determines whether SQLMesh should attempt automatic change categorization. This option is in the [plan](../reference/configuration.md#plan) section of the configuration reference page.

Supported values:

Expand Down
6 changes: 5 additions & 1 deletion examples/sushi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@
test_config = Config(
gateways={"in_memory": GatewayConfig(connection=DuckDBConnectionConfig())},
default_gateway="in_memory",
plan=PlanConfig(auto_categorize_changes=CategorizerConfig(sql=AutoCategorizationMode.SEMI)),
plan=PlanConfig(
auto_categorize_changes=CategorizerConfig(
sql=AutoCategorizationMode.SEMI, python=AutoCategorizationMode.OFF
)
),
model_defaults=model_defaults,
)

Expand Down
2 changes: 1 addition & 1 deletion sqlmesh/core/config/categorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CategorizerConfig(BaseConfig):
"""

external: AutoCategorizationMode = AutoCategorizationMode.FULL
python: AutoCategorizationMode = AutoCategorizationMode.OFF
python: AutoCategorizationMode = AutoCategorizationMode.FULL
sql: AutoCategorizationMode = AutoCategorizationMode.FULL
seed: AutoCategorizationMode = AutoCategorizationMode.FULL

Expand Down

0 comments on commit fe7d221

Please sign in to comment.