add/udf-hex-to-string (#6)

* added hex_to_string udf

* added udf to name
This commit is contained in:
drethereum 2023-03-14 13:55:47 -06:00 committed by GitHub
parent cf5ac50e1e
commit a1b89ae0ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 %}