Thanks to visit codestin.com
Credit goes to github.com

Skip to content

readme out of date with metadata function? #328

@sam-hoffman

Description

@sam-hoffman

Environment details

  • Programming language: Python
  • OS: Mac OS 13.2.1
  • Language runtime version: 3.9.16
  • Package version: sqlalchemy 2.0.15, sqlalchemy-spanner 1.6.2

Steps to reproduce

Following the directions in the README, I wrote the following:

from sqlalchemy import create_engine, Table
from sqlalchemy.schema import MetaData

engine = create_engine(
    f"spanner+spanner:///projects/{project}/instances/{instance}/databases/{database}"
)
        metadata = MetaData(bind=engine)

and got the error:

    metadata = MetaData(bind=engine)
TypeError: __init__() got an unexpected keyword argument 'bind'

It seems the README might be out of date - what is the new way of connecting to tables? I was hoping to insert data.

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the googleapis/python-spanner-sqlalchemy API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions