File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
dbt/include/risingwave/macros Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 4646 {{ return(load_result(' list_relations_without_caching' ).table) }}
4747{% endmacro %}
4848
49+ {% macro risingwave__create_schema(relation) - %}
50+ {% if relation .database - %}
51+ {{ adapter .verify_database (relation .database ) }}
52+ {%- endif - %}
53+
54+ {%- set schema_owner = none - %}
55+ {%- if config is defined - %}
56+ {%- set configured_owner = config .get (" schema_authorization" , none) - %}
57+ {%- if configured_owner is not none and configured_owner | trim != " " - %}
58+ {%- set schema_owner = configured_owner - %}
59+ {%- endif - %}
60+ {%- endif - %}
61+
62+ {%- call statement(' create_schema' ) - %}
63+ create schema if not exists {{ relation .without_identifier ().include(database= False) }}
64+ {%- if schema_owner %}
65+ authorization {{ adapter .quote (schema_owner) }}
66+ {%- endif %}
67+ {%- endcall - %}
68+ {% endmacro %}
69+
4970{% macro risingwave__get_columns_in_relation(relation) - %}
5071 {% call statement(' get_columns_in_relation' , fetch_result= True) %}
5172 select
You can’t perform that action at this time.
0 commit comments