Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 2.26 KB

alembic.rst

File metadata and controls

51 lines (36 loc) · 2.26 KB

Alembic support

Alembic is a lightweight database migration tool for usage with the SQLAlchemy Database Toolkit for Python. It can use this BigQuery SQLAlchemy support to manage BigQuery shemas.

Some features, like management of constrains and indexes, aren't supported because BigQuery doesn't support them.

Supported operations:

add_column(table_name, column, schema=None)

alter_column(table_name, column_name, nullable=None, schema=None)

bulk_insert(table, rows, multiinsert=True)

create_table(table_name, *columns, **kw)

create_table_comment(table_name, comment, schema=None)

drop_column(table_name, column_name, schema=None)

drop_table(table_name, schema=None)

drop_table_comment(table_name, schema=None)

execute(sqltext, execution_options=None)

rename_table(old_table_name, new_table_name, schema=None)

Note that some of the operations above have limited capability, again do to BigQuery limitations.

The execute operation allows access to BigQuery-specific data-definition-language.