@@ -87,9 +87,9 @@ def validate(cls: t.Any, data: t.Any) -> t.Any:
8787
8888class ConnectionConfig (abc .ABC , BaseConfig ):
8989 type_ : str
90- dialect : t .ClassVar [str ]
91- display_name : t .ClassVar [str ]
92- display_order : t .ClassVar [int ]
90+ DIALECT : t .ClassVar [str ]
91+ DISPLAY_NAME : t .ClassVar [str ]
92+ DISPLAY_ORDER : t .ClassVar [int ]
9393 concurrent_tasks : int
9494 register_comments : bool
9595 pre_ping : bool
@@ -466,9 +466,9 @@ class MotherDuckConnectionConfig(BaseDuckDBConnectionConfig):
466466 """Configuration for the MotherDuck connection."""
467467
468468 type_ : t .Literal ["motherduck" ] = Field (alias = "type" , default = "motherduck" )
469- dialect : t .ClassVar [t .Literal ["duckdb" ]] = "duckdb"
470- display_name : t .ClassVar [t .Literal ["MotherDuck" ]] = "MotherDuck"
471- display_order : t .ClassVar [t .Literal [5 ]] = 5
469+ DIALECT : t .ClassVar [t .Literal ["duckdb" ]] = "duckdb"
470+ DISPLAY_NAME : t .ClassVar [t .Literal ["MotherDuck" ]] = "MotherDuck"
471+ DISPLAY_ORDER : t .ClassVar [t .Literal [5 ]] = 5
472472
473473 @property
474474 def _connection_kwargs_keys (self ) -> t .Set [str ]:
@@ -493,9 +493,9 @@ class DuckDBConnectionConfig(BaseDuckDBConnectionConfig):
493493 """Configuration for the DuckDB connection."""
494494
495495 type_ : t .Literal ["duckdb" ] = Field (alias = "type" , default = "duckdb" )
496- dialect : t .ClassVar [t .Literal ["duckdb" ]] = "duckdb"
497- display_name : t .ClassVar [t .Literal ["DuckDB" ]] = "DuckDB"
498- display_order : t .ClassVar [t .Literal [1 ]] = 1
496+ DIALECT : t .ClassVar [t .Literal ["duckdb" ]] = "duckdb"
497+ DISPLAY_NAME : t .ClassVar [t .Literal ["DuckDB" ]] = "DuckDB"
498+ DISPLAY_ORDER : t .ClassVar [t .Literal [1 ]] = 1
499499
500500
501501class SnowflakeConnectionConfig (ConnectionConfig ):
@@ -546,9 +546,9 @@ class SnowflakeConnectionConfig(ConnectionConfig):
546546 session_parameters : t .Optional [dict ] = None
547547
548548 type_ : t .Literal ["snowflake" ] = Field (alias = "type" , default = "snowflake" )
549- dialect : t .ClassVar [t .Literal ["snowflake" ]] = "snowflake"
550- display_name : t .ClassVar [t .Literal ["Snowflake" ]] = "Snowflake"
551- display_order : t .ClassVar [t .Literal [2 ]] = 2
549+ DIALECT : t .ClassVar [t .Literal ["snowflake" ]] = "snowflake"
550+ DISPLAY_NAME : t .ClassVar [t .Literal ["Snowflake" ]] = "Snowflake"
551+ DISPLAY_ORDER : t .ClassVar [t .Literal [2 ]] = 2
552552
553553 _concurrent_tasks_validator = concurrent_tasks_validator
554554
@@ -745,9 +745,9 @@ class DatabricksConnectionConfig(ConnectionConfig):
745745 pre_ping : t .Literal [False ] = False
746746
747747 type_ : t .Literal ["databricks" ] = Field (alias = "type" , default = "databricks" )
748- dialect : t .ClassVar [t .Literal ["databricks" ]] = "databricks"
749- display_name : t .ClassVar [t .Literal ["Databricks" ]] = "Databricks"
750- display_order : t .ClassVar [t .Literal [3 ]] = 3
748+ DIALECT : t .ClassVar [t .Literal ["databricks" ]] = "databricks"
749+ DISPLAY_NAME : t .ClassVar [t .Literal ["Databricks" ]] = "Databricks"
750+ DISPLAY_ORDER : t .ClassVar [t .Literal [3 ]] = 3
751751
752752 _concurrent_tasks_validator = concurrent_tasks_validator
753753 _http_headers_validator = http_headers_validator
@@ -1004,9 +1004,9 @@ class BigQueryConnectionConfig(ConnectionConfig):
10041004 pre_ping : t .Literal [False ] = False
10051005
10061006 type_ : t .Literal ["bigquery" ] = Field (alias = "type" , default = "bigquery" )
1007- dialect : t .ClassVar [t .Literal ["bigquery" ]] = "bigquery"
1008- display_name : t .ClassVar [t .Literal ["BigQuery" ]] = "BigQuery"
1009- display_order : t .ClassVar [t .Literal [4 ]] = 4
1007+ DIALECT : t .ClassVar [t .Literal ["bigquery" ]] = "bigquery"
1008+ DISPLAY_NAME : t .ClassVar [t .Literal ["BigQuery" ]] = "BigQuery"
1009+ DISPLAY_ORDER : t .ClassVar [t .Literal [4 ]] = 4
10101010
10111011 _engine_import_validator = _get_engine_import_validator ("google.cloud.bigquery" , "bigquery" )
10121012
@@ -1149,9 +1149,9 @@ class GCPPostgresConnectionConfig(ConnectionConfig):
11491149 driver : str = "pg8000"
11501150
11511151 type_ : t .Literal ["gcp_postgres" ] = Field (alias = "type" , default = "gcp_postgres" )
1152- dialect : t .ClassVar [t .Literal ["postgres" ]] = "postgres"
1153- display_name : t .ClassVar [t .Literal ["GCP Postgres" ]] = "GCP Postgres"
1154- display_order : t .ClassVar [t .Literal [13 ]] = 13
1152+ DIALECT : t .ClassVar [t .Literal ["postgres" ]] = "postgres"
1153+ DISPLAY_NAME : t .ClassVar [t .Literal ["GCP Postgres" ]] = "GCP Postgres"
1154+ DISPLAY_ORDER : t .ClassVar [t .Literal [13 ]] = 13
11551155
11561156 concurrent_tasks : int = 4
11571157 register_comments : bool = True
@@ -1287,9 +1287,9 @@ class RedshiftConnectionConfig(ConnectionConfig):
12871287 pre_ping : bool = False
12881288
12891289 type_ : t .Literal ["redshift" ] = Field (alias = "type" , default = "redshift" )
1290- dialect : t .ClassVar [t .Literal ["redshift" ]] = "redshift"
1291- display_name : t .ClassVar [t .Literal ["Redshift" ]] = "Redshift"
1292- display_order : t .ClassVar [t .Literal [7 ]] = 7
1290+ DIALECT : t .ClassVar [t .Literal ["redshift" ]] = "redshift"
1291+ DISPLAY_NAME : t .ClassVar [t .Literal ["Redshift" ]] = "Redshift"
1292+ DISPLAY_ORDER : t .ClassVar [t .Literal [7 ]] = 7
12931293
12941294 _engine_import_validator = _get_engine_import_validator ("redshift_connector" , "redshift" )
12951295
@@ -1351,9 +1351,9 @@ class PostgresConnectionConfig(ConnectionConfig):
13511351 pre_ping : bool = True
13521352
13531353 type_ : t .Literal ["postgres" ] = Field (alias = "type" , default = "postgres" )
1354- dialect : t .ClassVar [t .Literal ["postgres" ]] = "postgres"
1355- display_name : t .ClassVar [t .Literal ["Postgres" ]] = "Postgres"
1356- display_order : t .ClassVar [t .Literal [12 ]] = 12
1354+ DIALECT : t .ClassVar [t .Literal ["postgres" ]] = "postgres"
1355+ DISPLAY_NAME : t .ClassVar [t .Literal ["Postgres" ]] = "Postgres"
1356+ DISPLAY_ORDER : t .ClassVar [t .Literal [12 ]] = 12
13571357
13581358 _engine_import_validator = _get_engine_import_validator ("psycopg2" , "postgres" )
13591359
@@ -1407,9 +1407,9 @@ class MySQLConnectionConfig(ConnectionConfig):
14071407 pre_ping : bool = True
14081408
14091409 type_ : t .Literal ["mysql" ] = Field (alias = "type" , default = "mysql" )
1410- dialect : t .ClassVar [t .Literal ["mysql" ]] = "mysql"
1411- display_name : t .ClassVar [t .Literal ["MySQL" ]] = "MySQL"
1412- display_order : t .ClassVar [t .Literal [14 ]] = 14
1410+ DIALECT : t .ClassVar [t .Literal ["mysql" ]] = "mysql"
1411+ DISPLAY_NAME : t .ClassVar [t .Literal ["MySQL" ]] = "MySQL"
1412+ DISPLAY_ORDER : t .ClassVar [t .Literal [14 ]] = 14
14131413
14141414 _engine_import_validator = _get_engine_import_validator ("pymysql" , "mysql" )
14151415
@@ -1472,9 +1472,9 @@ class MSSQLConnectionConfig(ConnectionConfig):
14721472 pre_ping : bool = True
14731473
14741474 type_ : t .Literal ["mssql" ] = Field (alias = "type" , default = "mssql" )
1475- dialect : t .ClassVar [t .Literal ["tsql" ]] = "tsql"
1476- display_name : t .ClassVar [t .Literal ["MSSQL" ]] = "MSSQL"
1477- display_order : t .ClassVar [t .Literal [11 ]] = 11
1475+ DIALECT : t .ClassVar [t .Literal ["tsql" ]] = "tsql"
1476+ DISPLAY_NAME : t .ClassVar [t .Literal ["MSSQL" ]] = "MSSQL"
1477+ DISPLAY_ORDER : t .ClassVar [t .Literal [11 ]] = 11
14781478
14791479 @model_validator (mode = "before" )
14801480 @classmethod
@@ -1616,8 +1616,8 @@ def _extra_engine_config(self) -> t.Dict[str, t.Any]:
16161616
16171617class AzureSQLConnectionConfig (MSSQLConnectionConfig ):
16181618 type_ : t .Literal ["azuresql" ] = Field (alias = "type" , default = "azuresql" ) # type: ignore
1619- display_name : t .ClassVar [t .Literal ["Azure SQL" ]] = "Azure SQL" # type: ignore
1620- display_order : t .ClassVar [t .Literal [10 ]] = 10 # type: ignore
1619+ DISPLAY_NAME : t .ClassVar [t .Literal ["Azure SQL" ]] = "Azure SQL" # type: ignore
1620+ DISPLAY_ORDER : t .ClassVar [t .Literal [10 ]] = 10 # type: ignore
16211621
16221622 @property
16231623 def _extra_engine_config (self ) -> t .Dict [str , t .Any ]:
@@ -1638,9 +1638,9 @@ class SparkConnectionConfig(ConnectionConfig):
16381638 pre_ping : t .Literal [False ] = False
16391639
16401640 type_ : t .Literal ["spark" ] = Field (alias = "type" , default = "spark" )
1641- dialect : t .ClassVar [t .Literal ["spark" ]] = "spark"
1642- display_name : t .ClassVar [t .Literal ["Spark" ]] = "Spark"
1643- display_order : t .ClassVar [t .Literal [8 ]] = 8
1641+ DIALECT : t .ClassVar [t .Literal ["spark" ]] = "spark"
1642+ DISPLAY_NAME : t .ClassVar [t .Literal ["Spark" ]] = "Spark"
1643+ DISPLAY_ORDER : t .ClassVar [t .Literal [8 ]] = 8
16441644
16451645 _engine_import_validator = _get_engine_import_validator ("pyspark" , "spark" )
16461646
@@ -1759,9 +1759,9 @@ class TrinoConnectionConfig(ConnectionConfig):
17591759 pre_ping : t .Literal [False ] = False
17601760
17611761 type_ : t .Literal ["trino" ] = Field (alias = "type" , default = "trino" )
1762- dialect : t .ClassVar [t .Literal ["trino" ]] = "trino"
1763- display_name : t .ClassVar [t .Literal ["Trino" ]] = "Trino"
1764- display_order : t .ClassVar [t .Literal [9 ]] = 9
1762+ DIALECT : t .ClassVar [t .Literal ["trino" ]] = "trino"
1763+ DISPLAY_NAME : t .ClassVar [t .Literal ["Trino" ]] = "Trino"
1764+ DISPLAY_ORDER : t .ClassVar [t .Literal [9 ]] = 9
17651765
17661766 _engine_import_validator = _get_engine_import_validator ("trino" , "trino" )
17671767
@@ -1922,9 +1922,9 @@ class ClickhouseConnectionConfig(ConnectionConfig):
19221922 connection_pool_options : t .Optional [t .Dict [str , t .Any ]] = None
19231923
19241924 type_ : t .Literal ["clickhouse" ] = Field (alias = "type" , default = "clickhouse" )
1925- dialect : t .ClassVar [t .Literal ["clickhouse" ]] = "clickhouse"
1926- display_name : t .ClassVar [t .Literal ["ClickHouse" ]] = "ClickHouse"
1927- display_order : t .ClassVar [t .Literal [6 ]] = 6
1925+ DIALECT : t .ClassVar [t .Literal ["clickhouse" ]] = "clickhouse"
1926+ DISPLAY_NAME : t .ClassVar [t .Literal ["ClickHouse" ]] = "ClickHouse"
1927+ DISPLAY_ORDER : t .ClassVar [t .Literal [6 ]] = 6
19281928
19291929 _engine_import_validator = _get_engine_import_validator ("clickhouse_connect" , "clickhouse" )
19301930
@@ -2049,9 +2049,9 @@ class AthenaConnectionConfig(ConnectionConfig):
20492049 pre_ping : t .Literal [False ] = False
20502050
20512051 type_ : t .Literal ["athena" ] = Field (alias = "type" , default = "athena" )
2052- dialect : t .ClassVar [t .Literal ["athena" ]] = "athena"
2053- display_name : t .ClassVar [t .Literal ["Athena" ]] = "Athena"
2054- display_order : t .ClassVar [t .Literal [15 ]] = 15
2052+ DIALECT : t .ClassVar [t .Literal ["athena" ]] = "athena"
2053+ DISPLAY_NAME : t .ClassVar [t .Literal ["Athena" ]] = "Athena"
2054+ DISPLAY_ORDER : t .ClassVar [t .Literal [15 ]] = 15
20552055
20562056 _engine_import_validator = _get_engine_import_validator ("pyathena" , "athena" )
20572057
@@ -2120,9 +2120,9 @@ class RisingwaveConnectionConfig(ConnectionConfig):
21202120 pre_ping : bool = True
21212121
21222122 type_ : t .Literal ["risingwave" ] = Field (alias = "type" , default = "risingwave" )
2123- dialect : t .ClassVar [t .Literal ["risingwave" ]] = "risingwave"
2124- display_name : t .ClassVar [t .Literal ["RisingWave" ]] = "RisingWave"
2125- display_order : t .ClassVar [t .Literal [16 ]] = 16
2123+ DIALECT : t .ClassVar [t .Literal ["risingwave" ]] = "risingwave"
2124+ DISPLAY_NAME : t .ClassVar [t .Literal ["RisingWave" ]] = "RisingWave"
2125+ DISPLAY_ORDER : t .ClassVar [t .Literal [16 ]] = 16
21262126
21272127 _engine_import_validator = _get_engine_import_validator ("psycopg2" , "risingwave" )
21282128
@@ -2168,7 +2168,7 @@ def init(cursor: t.Any) -> None:
21682168}
21692169
21702170DIALECT_TO_TYPE = {
2171- tpe .all_field_infos ()["type_" ].default : tpe .dialect
2171+ tpe .all_field_infos ()["type_" ].default : tpe .DIALECT
21722172 for tpe in subclasses (
21732173 __name__ ,
21742174 ConnectionConfig ,
@@ -2178,8 +2178,8 @@ def init(cursor: t.Any) -> None:
21782178
21792179INIT_DISPLAY_INFO_TO_TYPE = {
21802180 tpe .all_field_infos ()["type_" ].default : (
2181- tpe .display_order ,
2182- tpe .display_name ,
2181+ tpe .DISPLAY_ORDER ,
2182+ tpe .DISPLAY_NAME ,
21832183 )
21842184 for tpe in subclasses (
21852185 __name__ ,
0 commit comments