-
Notifications
You must be signed in to change notification settings - Fork 139
Description
Is your feature request related to a problem? Please describe.
Other SqlAlchemy dialects define a dialect
attribute, including but not limited to:
- base.dialect = dialect = snowdialect.dialect
- base.dialect = dialect = mysqldb.dialect
- base.dialect = dialect = psycopg2.dialect
Some libraries assume that this dialect
attribute is defined, and without this the libraries work for every other dialect except for BigQuery
. For example, the popular Great Expectations library commonly assumes this convention (e.g. see this search which shows some but not all usages). In the case of Great Expectations, BigQuery not following this convention currently results in multiple bugs that only affect BigQuery and no other dialects: great-expectations/great_expectations#3131, great-expectations/great_expectations#2978, and great-expectations/great_expectations#2959.
Describe the solution you'd like
BigQuery should follow the same conventions as other dialects so libraries using SqlAlchemy support BigQuery without special BigQuery specific code.
Describe alternatives you've considered
Writing custom code for BigQuery when used with SqlAlchemy instead of relying on conventions used by all other dialects, however this is harder to maintain and will probably result in future bugs for multiple libraries that only affect BigQuery and not other dialects.
Additional context
Please see proposed fix at Follow SQLAlchemy dialect attribute convention #251.