说我想放弃ajs
模式作为我们的开发数据库上的清理活动,而不是作为常规dbt
工作流的一部分
dbt run-operation drop_schema --args '{relation: ajs}'
也许我需要将drop_schema
包装到另一个宏drop_schema_str(schema_str)
中,其中schema_str
是模式的字符串,并且在调用drop_schema()
之前用于制作Relation
对象?
创建宏
{% macro drop_schema_str(schema) %}
{% set relation = api.Relation.create(database=target.database, schema=schema) %}
{% do drop_schema(relation) %}
{% endmacro %}
然后用
调用它dbt run-operation drop_schema_str --args '{schema: ajs}'