What's the best practice for managing Dynamic tables through schemachange, versioned or repeatable?
Opened this issue · 2 comments
** What are you trying to accomplish? **
We are using dynamic tables heavily. Decided to use schemachange for Gitlab CI pipeline.
I've structured the folders, but there's not much documentation about how to handle dynamic tables, should they be treated as versioned objects similar to simple SQL tables or repeatable objects like views?
** What options have you tried so far ? **
For now, I've structured them as versioned objects, but obvious concern is if there's any change to implementation logic of DT, need to create new version script for DT
But if I put them as repeatable, then problem is data may get deleted on next CI pipeline run.
Please provide guidance and recommended approach, it'll be helpful for others if this is included in the documentation of schemachange as well
Hi @mayur0207 ,
Based on my limited use of dynamic tables so far, changes to their implementation logic (the body of the query), are designed to be a drop+create action, regardless of which change management tool you're using. So for that reason, I think they're a good fit for versioned objects and I don't really see any other way.
Dynamic tables belong in repeatable scripts.
I don't believe you will experience any data loss on subsequent CI pipeline runs unless you make a change to the dynamic table script, and if you do make a change to the script, then you would want to recreate the dynamic table anyway.