Skip to content

README Sample Code Throws Errors #1163

Open
@nigelainscoe

Description

@nigelainscoe

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

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the googleapis/python-bigquery-sqlalchemy API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions