From 60f66fc288a0e8c5b9a43cf6dee13598a9f14756 Mon Sep 17 00:00:00 2001 From: Jacob Beck Date: Fri, 19 Jul 2019 14:50:28 -0400 Subject: [PATCH] Make database/schema mandatory for all credentials --- core/dbt/adapters/base/connections.py | 2 ++ plugins/bigquery/dbt/adapters/bigquery/connections.py | 2 -- plugins/postgres/dbt/adapters/postgres/connections.py | 2 -- plugins/snowflake/dbt/adapters/snowflake/connections.py | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/core/dbt/adapters/base/connections.py b/core/dbt/adapters/base/connections.py index fecbf55bf36..d0d5ae354bb 100644 --- a/core/dbt/adapters/base/connections.py +++ b/core/dbt/adapters/base/connections.py @@ -22,6 +22,8 @@ class Credentials( Replaceable, metaclass=abc.ABCMeta ): + database: str + schema: str _ALIASES: ClassVar[Dict[str, str]] = field(default={}, init=False) @abc.abstractproperty diff --git a/plugins/bigquery/dbt/adapters/bigquery/connections.py b/plugins/bigquery/dbt/adapters/bigquery/connections.py index abfe3e38239..a737855195f 100644 --- a/plugins/bigquery/dbt/adapters/bigquery/connections.py +++ b/plugins/bigquery/dbt/adapters/bigquery/connections.py @@ -26,8 +26,6 @@ class BigQueryConnectionMethod(StrEnum): @dataclass class BigQueryCredentials(Credentials): method: BigQueryConnectionMethod - database: str - schema: str keyfile: Optional[str] = None keyfile_json: Optional[Dict[str, Any]] = None timeout_seconds: Optional[int] = 300 diff --git a/plugins/postgres/dbt/adapters/postgres/connections.py b/plugins/postgres/dbt/adapters/postgres/connections.py index 1915df00557..3d2af3d4a99 100644 --- a/plugins/postgres/dbt/adapters/postgres/connections.py +++ b/plugins/postgres/dbt/adapters/postgres/connections.py @@ -14,12 +14,10 @@ @dataclass class PostgresCredentials(Credentials): - database: str host: str user: str password: str port: Port - schema: str search_path: Optional[str] keepalives_idle: Optional[int] = 0 # 0 means to use the default value diff --git a/plugins/snowflake/dbt/adapters/snowflake/connections.py b/plugins/snowflake/dbt/adapters/snowflake/connections.py index e0a37c1c755..17829fda2db 100644 --- a/plugins/snowflake/dbt/adapters/snowflake/connections.py +++ b/plugins/snowflake/dbt/adapters/snowflake/connections.py @@ -20,8 +20,6 @@ class SnowflakeCredentials(Credentials): account: str user: str - database: str - schema: str warehouse: Optional[str] role: Optional[str] password: Optional[str]