Skip to content

README Sample Code Throws Errors #1163

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

Open
nigelainscoe opened this issue Feb 11, 2025 · 1 comment
Open

README Sample Code Throws Errors #1163

nigelainscoe opened this issue Feb 11, 2025 · 1 comment
Assignees
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API.

Comments

@nigelainscoe
Copy link

Environment details

  • OS type and version: Windows 11 24H2
  • Python version: 3.11.4
  • pip version: 25
  • sqlalchemy-bigquery version: 1.12.1

Steps to reproduce

When running the sample code from the README, the line:

table = Table('dataset.table', MetaData(bind=engine), autoload=True)

returns the following error:

    table = Table('dataset.table', MetaData(bind=engine), autoload=True)
                                                ^^^^^^^^^^^^^^^^^^^^^
TypeError: MetaData.__init__() got an unexpected keyword argument 'bind'

The following line:

print(select([func.count('*')], from_obj=table().scalar()))

also contains a compiler warning that 'Table' object is not callable

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. label Feb 11, 2025
@suzmue suzmue assigned chalmerlowe and unassigned suzmue Feb 19, 2025
@chalmerlowe
Copy link
Collaborator

@nigelainscoe

Thanks for reporting this. I will take a look.

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.
Projects
None yet
Development

No branches or pull requests

3 participants