mirror of
https://github.com/FlipsideCrypto/fsc-utils.git
synced 2026-02-06 10:56:49 +00:00
macro test
This commit is contained in:
parent
99ef480bc7
commit
2dc8527001
12
macros/hex_to_string_udf.sql
Normal file
12
macros/hex_to_string_udf.sql
Normal file
@ -0,0 +1,12 @@
|
||||
{% macro create_udf_hex_to_string(schema) %}
|
||||
CREATE OR REPLACE FUNCTION {{ schema }}.udf_hex_to_string(hex STRING)
|
||||
RETURNS TEXT
|
||||
LANGUAGE SQL
|
||||
STRICT IMMUTABLE AS
|
||||
$$
|
||||
SELECT
|
||||
LTRIM(regexp_replace(
|
||||
try_hex_decode_string(hex),
|
||||
'[\x00-\x1F\x7F-\x9F\xAD]', '', 1))
|
||||
$$;
|
||||
{% endmacro %}
|
||||
Loading…
Reference in New Issue
Block a user