Skip to content

Commit

Permalink
combine profile and context functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Beck committed Sep 18, 2018
1 parent 31b445b commit 1a5bac5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 5 additions & 2 deletions dbt/adapters/bigquery/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

class BigQueryAdapter(PostgresAdapter):

context_functions = [
config_functions = [
# deprecated -- use versions that take relations instead
"query_for_existing",
"execute_model",
Expand All @@ -51,7 +51,10 @@ class BigQueryAdapter(PostgresAdapter):
"drop_relation",
"rename_relation",

"get_columns_in_table"
"get_columns_in_table",

# formerly profile functions
"add_query",
]

SCOPE = ('https://www.googleapis.com/auth/bigquery',
Expand Down
5 changes: 2 additions & 3 deletions dbt/adapters/default/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test(row):
class DefaultAdapter(object):
requires = {}

context_functions = [
config_functions = [
"get_columns_in_table",
"get_missing_columns",
"expand_target_column_types",
Expand All @@ -75,9 +75,8 @@ class DefaultAdapter(object):
"drop_relation",
"rename_relation",
"truncate_relation",
]

profile_functions = [
# formerly profile functions
"execute",
"add_query",
]
Expand Down
3 changes: 1 addition & 2 deletions dbt/context/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ def __init__(self, model, adapter):
self.adapter = adapter
self.Relation = RelationProxy(adapter)

# TODO: clean up this part of the adapter classes
self._wrapped = frozenset(
self.adapter.context_functions + self.adapter.profile_functions
self.adapter.config_functions
)
self._proxied = frozenset(self.adapter.raw_functions)

Expand Down

0 comments on commit 1a5bac5

Please sign in to comment.