Skip to content

Commit

Permalink
Standardize the adapter for core debug changes. (#754)
Browse files Browse the repository at this point in the history
* Standardize the adapter for core debug changes.

* add changelog

* Tweak fields

---------

Co-authored-by: Mila Page <versusfacit@users.noreply.github.com>
  • Loading branch information
VersusFacit and VersusFacit authored Jun 7, 2023
1 parent 389acee commit aa7bea8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20230604-034603.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Standardize the _connection_keys and debug_query for `dbt debug`.
time: 2023-06-04T03:46:03.065575-07:00
custom:
Author: versusfacit
Issue: PR754
15 changes: 13 additions & 2 deletions dbt/adapters/bigquery/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,28 @@ def _connection_keys(self):
return (
"method",
"database",
"execution_project",
"schema",
"location",
"priority",
"timeout_seconds",
"maximum_bytes_billed",
"execution_project",
"impersonate_service_account",
"job_retry_deadline_seconds",
"job_retries",
"job_creation_timeout_seconds",
"job_execution_timeout_seconds",
"keyfile",
"keyfile_json",
"timeout_seconds",
"token",
"refresh_token",
"client_id",
"client_secret",
"token_uri",
"dataproc_region",
"dataproc_cluster_name",
"gcs_bucket",
"dataproc_batch",
)

@classmethod
Expand Down
4 changes: 4 additions & 0 deletions dbt/adapters/bigquery/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,3 +978,7 @@ def render_model_constraint(cls, constraint: ModelLevelConstraint) -> Optional[s
return f"{c} not enforced" if c else None

return c

def debug_query(self):
"""Override for DebugTask method"""
self.execute("select 1 as id")

0 comments on commit aa7bea8

Please sign in to comment.