mirror of
https://github.com/FlipsideCrypto/livequery-models.git
synced 2026-02-06 10:56:46 +00:00
Refactor macro names and add deployment model for _live schema
This commit is contained in:
parent
de2ade547b
commit
32ff24fe12
@ -1,6 +1,6 @@
|
||||
{% macro config_core__live(schema="_live") %}
|
||||
|
||||
- name: {{ schema }}._udf_api
|
||||
- name: {{ schema }}.udf_api
|
||||
signature:
|
||||
- [method, STRING]
|
||||
- [url, STRING]
|
||||
@ -16,7 +16,7 @@
|
||||
RETURNS NULL ON NULL INPUT
|
||||
sql: udf_api
|
||||
|
||||
- name: {{ schema }}.udf_rest_api_args_only
|
||||
{# - name: {{ schema }}.udf_rest_api_args_only
|
||||
signature:
|
||||
- [method, STRING]
|
||||
- [url, STRING]
|
||||
@ -35,9 +35,9 @@
|
||||
'headers': headers,
|
||||
'data': data,
|
||||
'secret_name': SECRET_NAME
|
||||
}
|
||||
} #}
|
||||
|
||||
- name: {{ schema }}.udf_api
|
||||
{# - name: {{ schema }}.udf_api
|
||||
description: |
|
||||
This function is used to select the appropriate function to call based on the user_id
|
||||
signature:
|
||||
@ -58,7 +58,7 @@
|
||||
WHEN user_id ilike 'AWS_%'
|
||||
THEN {{ schema }}.udf_rest_api_args_only(method, url, headers, DATA, SECRET)::VARIANT
|
||||
ELSE {{ schema }}._udf_api(method, url, headers, DATA, user_id, SECRET)
|
||||
END
|
||||
END #}
|
||||
|
||||
|
||||
{% endmacro %}
|
||||
Loading…
Reference in New Issue
Block a user