mirror of
https://github.com/FlipsideCrypto/flow-models.git
synced 2026-02-06 15:36:43 +00:00
* lq overload deploy success * fixed make directive line continuation --------- Co-authored-by: shah <info@shahnewazkhan.ca>
29 lines
655 B
SQL
29 lines
655 B
SQL
{% macro config_core__utils(schema="_utils") %}
|
|
|
|
- name: {{ schema }}.udf_register_secret
|
|
signature:
|
|
- [request_id, STRING]
|
|
- [user_id, STRING]
|
|
- [key, STRING]
|
|
return_type: TEXT
|
|
func_type: SECURE EXTERNAL
|
|
api_integration: '{{ var("API_INTEGRATION") }}'
|
|
options: |
|
|
NOT NULL
|
|
RETURNS NULL ON NULL INPUT
|
|
sql: secret/register
|
|
|
|
- name: {{ schema }}.udf_whoami
|
|
signature: []
|
|
func_type: SECURE
|
|
return_type: TEXT
|
|
options: |
|
|
NOT NULL
|
|
RETURNS NULL ON NULL INPUT
|
|
IMMUTABLE
|
|
MEMOIZABLE
|
|
sql: |
|
|
SELECT
|
|
COALESCE(PARSE_JSON(GETVARIABLE('LIVEQUERY_CONTEXT')):userId::STRING, CURRENT_USER())
|
|
|
|
{% endmacro %} |