[CT-610] Prefer SQL for create_schema
+ drop_schema
#182
Labels
type:enhancement
New feature or request
create_schema
+ drop_schema
#182
reopening #30
Today,
dbt-bigquery
operates as a "base" (Python) adapter for most low-level operations. This means that standard stuff like creating schemas, dropping schemas, getting columns in relations, etc, are all actually API calls wired through the Python client.As BigQuery adds more support for SQL, it's preferable to use it where possible, and where there are few trade-offs. Two reasons:
create_schema
+drop_schema
into "user-space" code, allowing for custom reimplementations if desired. This is a capability users have on other databases. It's especially important forcreate_schema
+drop_schema
, since these don't pass through SQL/Jinja land at all when called asadapter
methods from dbt's Python tasks, namely hereThe trade-offs I can imagine:
get_columns_in_relation
can return a contractedSchemaField
, which we can turn into dbtBigQueryColumn
objects, much more easily than passing query results throughagate
The text was updated successfully, but these errors were encountered: