Skip to content

Commit

Permalink
use frozenset for adapter specific configs, add bq configs
Browse files Browse the repository at this point in the history
  • Loading branch information
drewbanin committed Feb 11, 2019
1 parent 8212994 commit ab6d4d7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion core/dbt/adapters/base/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ class BaseAdapter(object):
# This should be an implementation of BaseConnectionManager
ConnectionManager = None

AdapterSpecificConfigs = set()
# A set of clobber config fields accepted by this adapter
# for use in materializations
AdapterSpecificConfigs = frozenset()

def __init__(self, config):
self.config = config
Expand Down
2 changes: 2 additions & 0 deletions plugins/bigquery/dbt/adapters/bigquery/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class BigQueryAdapter(BaseAdapter):
Column = dbt.schema.BigQueryColumn
ConnectionManager = BigQueryConnectionManager

AdapterSpecificConfigs = frozenset({"cluster_by", "partition_by"})

###
# Implementations of abstract methods
###
Expand Down
2 changes: 1 addition & 1 deletion plugins/redshift/dbt/adapters/redshift/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class RedshiftAdapter(PostgresAdapter):
ConnectionManager = RedshiftConnectionManager

AdapterSpecificConfigs = {"sort_type", "dist", "sort", "bind"}
AdapterSpecificConfigs = frozenset({"sort_type", "dist", "sort", "bind"})

@classmethod
def date_function(cls):
Expand Down
2 changes: 1 addition & 1 deletion plugins/snowflake/dbt/adapters/snowflake/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SnowflakeAdapter(SQLAdapter):
Relation = SnowflakeRelation
ConnectionManager = SnowflakeConnectionManager

AdapterSpecificConfigs = {"transient"}
AdapterSpecificConfigs = frozenset({"transient"})

@classmethod
def date_function(cls):
Expand Down

0 comments on commit ab6d4d7

Please sign in to comment.