2121 TableNamingConvention ,
2222)
2323from sqlmesh .core .config .connection import DuckDBAttachOptions , RedshiftConnectionConfig
24- from sqlmesh .core .config .feature_flag import DbtFeatureFlag , FeatureFlag
2524from sqlmesh .core .config .loader import (
2625 load_config_from_env ,
2726 load_config_from_paths ,
@@ -299,12 +298,10 @@ def test_load_config_from_env():
299298 {
300299 "SQLMESH__GATEWAY__CONNECTION__TYPE" : "duckdb" ,
301300 "SQLMESH__GATEWAY__CONNECTION__DATABASE" : "test_db" ,
302- "SQLMESH__FEATURE_FLAGS__DBT__SCD_TYPE_2_SUPPORT" : "false" ,
303301 },
304302 ):
305303 assert Config .parse_obj (load_config_from_env ()) == Config (
306304 gateways = GatewayConfig (connection = DuckDBConnectionConfig (database = "test_db" )),
307- feature_flags = FeatureFlag (dbt = DbtFeatureFlag (scd_type_2_support = False )),
308305 )
309306
310307
@@ -505,35 +502,6 @@ def test_physical_schema_mapping_mutually_exclusive_with_physical_schema_overrid
505502 Config (physical_schema_override = {"foo" : "bar" }, physical_schema_mapping = {"^foo$" : "bar" }) # type: ignore
506503
507504
508- def test_load_feature_flag (tmp_path_factory ):
509- config_path = tmp_path_factory .mktemp ("yaml_config" ) / "config.yaml"
510- with open (config_path , "w" , encoding = "utf-8" ) as fd :
511- fd .write (
512- """
513- gateways:
514- duckdb_gateway:
515- connection:
516- type: duckdb
517- model_defaults:
518- dialect: bigquery
519- feature_flags:
520- dbt:
521- scd_type_2_support: false
522- """
523- )
524-
525- assert load_config_from_paths (
526- Config ,
527- project_paths = [config_path ],
528- ) == Config (
529- gateways = {
530- "duckdb_gateway" : GatewayConfig (connection = DuckDBConnectionConfig ()),
531- },
532- model_defaults = ModelDefaultsConfig (dialect = "bigquery" ),
533- feature_flags = FeatureFlag (dbt = DbtFeatureFlag (scd_type_2_support = False )),
534- )
535-
536-
537505def test_load_alternative_config_type (yaml_config_path : Path , python_config_path : Path ):
538506 class DerivedConfig (Config ):
539507 pass
@@ -1435,7 +1403,7 @@ def test_physical_table_naming_convention(
14351403gateways:
14361404 test_gateway:
14371405 connection:
1438- type: duckdb
1406+ type: duckdb
14391407model_defaults:
14401408 dialect: duckdb
14411409{ config_part }
@@ -1504,7 +1472,7 @@ def test_load_configs_in_dbt_project_without_config_py(tmp_path: Path):
15041472 outputs:
15051473 dev:
15061474 type: duckdb
1507- path: 'jaffle_shop.duckdb'
1475+ path: 'jaffle_shop.duckdb'
15081476 """ )
15091477
15101478 (tmp_path / "sqlmesh.yaml" ).write_text ("""
@@ -1513,7 +1481,7 @@ def test_load_configs_in_dbt_project_without_config_py(tmp_path: Path):
15131481 state_connection:
15141482 type: duckdb
15151483 database: state.db
1516- model_defaults:
1484+ model_defaults:
15171485 start: '2020-01-01'
15181486""" )
15191487
0 commit comments