Open JacobHayes opened 2 months ago
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge
label. Good luck human!
-- conventional-commit-lint bot https://conventionalcommits.org/
Hi, any chance I could get the tests approved to run on the PR? I've been trying to setup the system tests locally, but they're a bit onerous (understandably).
Sorry for the delay, just started running the tests!
Sorry for the delay, just started running the tests!
no worries, thank you!
Fixes #838 and fixes #1088. 🦕
The
get_table_names
andget_view_names
methods are supposed to return the bare names (no{schema}.
prefix) of the resources for a single schema/dataset (whereschema=None
is the "default schema", not "all schemas"). However, theBigQueryDialect
implementation returns:schema
: if the connection has a default dataset{schema}.
prefixed names for one schema: if the connection doesn't have a default dataset and theschema
arg is a string{schema}.
prefixed names for all schemas: if the connection doesn't have a default dataset and theschema
arg isNone
The bolded parts cause issues outlined in #1088. This PR fixes the
get_table_names
andget_view_names
implementations to return bare names as SQLAlchemy expects.This is a breaking change for a subset of users:
Metadata.reflect()
without aschema
argument were probably expecting to reflect all datasets, but they would now not reflect anything.public
) - so without a default set on the connection string, we don't have anything to search and return an empty list.This has been working for me locally with
alembic
+ no default dataset (the models specify the schema) +include_schemas=True
(required for cross-schema stuff).