You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I'd like to know which strategy should be applied in order to create and insert primary keys using python-spanner-sqlalchemy, since the standard documentation recommends against the usage of auto-increment ids, although looking into the library's samples I've come across the following row insertion snippet: def insert_row(connection, table): """Insert row into the table. The table must already exist and can be created usingcreate_table.`
"""
connection.execute(table.insert(), {"user_id": 1, "user_name": "ABC"})
That resembles the usage of auto-increment primary keys in SQLAlchemy's documentation, but being migrating from a regular database provider (Postgres), I don't know if it would be a good practice to just translate the current tables with auto-increment indexes to Cloud Spanner.
Hi!
I'd like to know which strategy should be applied in order to create and insert primary keys using python-spanner-sqlalchemy, since the standard documentation recommends against the usage of auto-increment ids, although looking into the library's samples I've come across the following row insertion snippet:
def insert_row(connection, table): """Insert row into the table. The table must already exist and can be created usingcreate_table.`"""
connection.execute(table.insert(), {"user_id": 1, "user_name": "ABC"})
`
That resembles the usage of auto-increment primary keys in SQLAlchemy's documentation, but being migrating from a regular database provider (Postgres), I don't know if it would be a good practice to just translate the current tables with auto-increment indexes to Cloud Spanner.