1

I need to create view based on multiple tables in SQLAlchemy. For view creation I'm using recipe from How to create an SQL View with SQLAlchemy?. Compiler extension is executed with execute_at as following:

def create_view_from_tables_A_and_B():
    CreateView(...).execute_at('after-create', TableA.__table__)
    DropView(...).execute_at('before-drop', TableA.__table__)

The problem is that between tables A and B is no relation and sometimes table A is created first, sometimes it's table B.

Is there a way how to run DDL after all needed tables/metadatas are created?

Community
  • 1
  • 1
kiri
  • 56
  • 4

0 Answers0