Thanks @joellabes .
For what concerns option 1: what is your suggested approach to temporarily archive a schema we’d like to keep for disaster recovery as we test for Blue / Green Deployment?
I couldn’t find a post specifically on this topic so far.
Thanks @joellabes .
For what concerns option 1: what is your suggested approach to temporarily archive a schema we’d like to keep for disaster recovery as we test for Blue / Green Deployment?
I couldn’t find a post specifically on this topic so far.
A couple of options:
dbt_utils.get_relations_by_pattern and then loop over its results with handwritten sql statements:--pseudocode
{% set relations = dbt_utils.get_relations_by_pattern(schema_pattern='original_schema', table_pattern='%') %}
{% for relation in relations %}
create table original_schema_archive.{{ relation.identifier }} as (select * from {{ relation }})
{% endfor %}
I would go with option 1 personally!