diff --git a/macros/hex_to_str_udf.sql b/macros/hex_to_str_udf.sql new file mode 100644 index 0000000..7153cc0 --- /dev/null +++ b/macros/hex_to_str_udf.sql @@ -0,0 +1,5 @@ +{% macro udf_hex_to_string(hex_string) %} + LTRIM(regexp_replace( + try_hex_decode_string({{ hex_string }}), + '[\x00-\x1F\x7F-\x9F\xAD]', '', 1)) +{% endmacro %} \ No newline at end of file