Closed asmisha closed 3 years ago
Discussion notes:
Problem: in case of changes in schema Hasura doesn't start until we run Meltano pipeline. Meltano doesn't have a working mechanism for DB migrations.
Solution:
public
schema; restrict Meltano from making any changes in schema (how?)Considerations:
The problem lies a bit deeper. From what I see, hasura will be down the whole time dbt
is working, because of the way it works with tables and foreign keys.
This means that hasura must be completely disconnected from meltano until it runs the first transformation and while it runs every subsequent transformations.
This means that our full service deployment
may look something like this:
This will give us a working environment. Each time we need to redeploy / rerun ETL (meaning, daily) we will:
full service deployment
on a new environment (meltano, lambda, rds)The problem with this approach is that we should preserve app
schema and keep it in sync between environments. However hasura has its own migrations, which leads to a situation, where
BTW considering this I can't think of an approach to have multiple hasura instances at all and thus having deployment process without a downtime.
@vood @vasilii-gainy what do you think?
For now let's consider delivering changes schema changes in two steps:
Currently if we add a new DBT model and also add it to hasura - hasura will fail to start until transformation is executed. The proposed solution is managing meltano model tables schemas through a 3rd party tool. The one i found that suits our needs is https://www.prisma.io/ It's able to generate migrations based on previous migrations (not the current db schema) which will allow us to nearly-automate the process of keeping db schema in sync.