mirror of
https://github.com/FlipsideCrypto/livequery-models.git
synced 2026-02-06 10:56:46 +00:00
add/udf-hex-to-string (#6)
* added hex_to_string udf * added udf to name
This commit is contained in:
parent
cf5ac50e1e
commit
a1b89ae0ee
@ -68,6 +68,20 @@
|
||||
sql: |
|
||||
{{ python_udf_hex_to_int_with_encoding() | indent(4) }}
|
||||
|
||||
- name: utils.udf_hex_to_string
|
||||
signature:
|
||||
- [hex, STRING]
|
||||
return_type: TEXT
|
||||
options: |
|
||||
NULL
|
||||
LANGUAGE SQL
|
||||
STRICT IMMUTABLE
|
||||
sql: |
|
||||
SELECT
|
||||
LTRIM(regexp_replace(
|
||||
try_hex_decode_string(hex),
|
||||
'[\x00-\x1F\x7F-\x9F\xAD]', '', 1))
|
||||
|
||||
{#
|
||||
LIVE SCHEMA
|
||||
#}
|
||||
@ -105,6 +119,5 @@
|
||||
secret_name
|
||||
)
|
||||
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user