Skip to content

Conversation

jdimatteo
Copy link

@jdimatteo jdimatteo commented Aug 16, 2021

Fixes #250

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. label Aug 16, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 16, 2021
@jdimatteo jdimatteo force-pushed the feature/follow-dialect-attribute-convention branch from aacb492 to 0631ccc Compare August 16, 2021 22:15
@@ -41,6 +41,9 @@
BIGNUMERIC,
)

# Define a "dialect" attribute to follow the common SqlAlchemy convention assumed by some libraries that leverage SqlAlchemy.
base.dialect = dialect = BigQueryDialect
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you'd like me to write a test, please let me know what file I should add the test to.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'd put this in tests/unit/test_sqlalchemy_bigquery.py.

@@ -41,6 +41,9 @@
BIGNUMERIC,
)

# Define a "dialect" attribute to follow the common SqlAlchemy convention assumed by some libraries that leverage SqlAlchemy.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other SqlAlchemy dialects define a dialect attribute, including but not limited to:

See additional details on why this matters at #250.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. I wasn't aware of this. Thanks!

This is a weird way to spell this. Why not define dialect in base and import it? 🤷

@jimfulton
Copy link
Contributor

I'll add the test...

@jimfulton
Copy link
Contributor

I'll add the test...

Well, no, I can't do that without creating a new PR.

Copy link
Contributor

@jimfulton jimfulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test in tests/unit/test_sqlalchemy_bigquery.py.

It can be as simple as checking that the dialect is present as the dialect attribute in base and in the package. Should take 5 minutes to write. :)

@jimfulton
Copy link
Contributor

Superseded by #291

@jimfulton jimfulton closed this Aug 20, 2021
@jdimatteo
Copy link
Author

jdimatteo commented Aug 20, 2021

Please add a test in tests/unit/test_sqlalchemy_bigquery.py.

It can be as simple as checking that the dialect is present as the dialect attribute in base and in the package. Should take 5 minutes to write. :)

Sorry I didn't do this sooner -- thanks for fixing this with #291!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include a dialect attribute to better follow common SqlAlchemy conventions relied upon by SqlAlchemy libraries
2 participants