mirror of
https://github.com/FlipsideCrypto/fsc-utils.git
synced 2026-02-06 10:56:49 +00:00
create udfs
This commit is contained in:
parent
84a954d74e
commit
408192bf65
@ -1,17 +1,13 @@
|
||||
{% macro create_udfs(drop_=False) %}
|
||||
{% if var("UPDATE_UDFS_AND_SPS") %}
|
||||
{% set name %}
|
||||
{{- udf_configs() -}}
|
||||
{{- reference_models.udf_configs() -}}
|
||||
{% endset %}
|
||||
{% set udfs = fromyaml(name) %}
|
||||
{% set sql %}
|
||||
CREATE schema if NOT EXISTS silver;
|
||||
CREATE schema if NOT EXISTS utils;
|
||||
CREATE schema if NOT EXISTS _utils;
|
||||
CREATE schema if NOT EXISTS _live;
|
||||
CREATE schema if NOT EXISTS live;
|
||||
{%- for udf in udfs -%}
|
||||
{{- create_or_drop_function_from_config(udf, drop_=drop_) -}}
|
||||
{{- reference_models.create_or_drop_function_from_config(udf, drop_=drop_) -}}
|
||||
{% endfor %}
|
||||
{% endset %}
|
||||
{% do run_query(sql) %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user