Skip to content

don't enforce "use_labels = True" #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sagydr opened this issue Dec 29, 2020 · 2 comments · Fixed by #129
Closed

don't enforce "use_labels = True" #78

sagydr opened this issue Dec 29, 2020 · 2 comments · Fixed by #129
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@sagydr
Copy link

sagydr commented Dec 29, 2020

BigQueryCompiler.visit_select sets args[0].use_labels = True
in my project for example this is unneeded and changes all column names.
Please either:

  1. provider a way to ignore that assignment
  2. provide a way to "translate" back column name as label to its original name

image

@ibnubay
Copy link

ibnubay commented Jan 3, 2021

It's important when integrate with dask.read_sql_table, when we must fill index_col in bigquery table.
The column will change when going to pandas dataframe, pandas doesn't get the column index.
Because the column has be change, ex: in query select a column alias will be [dataset_name]_[table_name]_[column_name]

like in here
image

PS: I hope, I comment on same correct problem.

@tswast tswast added api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Mar 23, 2021
@jimfulton
Copy link
Contributor

We're going to stop forcing labels. :)

jimfulton pushed a commit that referenced this issue Apr 20, 2021
tswast pushed a commit that referenced this issue Apr 20, 2021
* Fixed a dependency problem that caysed test failures in Python 3.6.

The source of the dependency bug is in old versions of google-cloud-core that
depend on too-old versions of google-api-core.

* Provide a bigquery mock based on sqlite

So we don't have t mock at the api level.

* Don't force labels in select.

#78
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. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants