Slackbot
06/01/2023, 2:00 PMVadim
06/01/2023, 5:08 PM\
before the "
around test? in what you posted? Are yo submitting the string from something that does its own escaping?Vadim
06/01/2023, 5:16 PMVadim
06/01/2023, 5:16 PMVadim
06/01/2023, 5:17 PMVadim
06/02/2023, 12:16 AMJRob
06/02/2023, 12:56 AMVadim
06/02/2023, 2:14 AM\
in literals (unlike in SQL). So to encode the regex \|
you have to have '\\|'
as the second argument to string_to_array
. But that whole thing is contained within a JSON string representing the ingestion spec... so you need to express string_to_array("test", '\\|')
in the json you actually have to write "string_to_array(\"test\", '\\\\|')"
. I hope this answers your question of why the delimiter is going through multiple stages of interpolation. It is intended.Vadim
06/02/2023, 2:14 AMVadim
06/02/2023, 2:16 AMJRob
06/02/2023, 2:16 AMVadim
06/02/2023, 2:18 AM\
character and use the fact that math-expr allows you to enter unicode code points . os write \u005C
which will be "...\\u005C..."
when written inside of a JSON stringVadim
06/02/2023, 2:19 AMVadim
06/02/2023, 2:20 AMVadim
06/02/2023, 2:21 AMJRob
06/02/2023, 2:23 AM'\\|'
is a string literal and it's clearly being interpolated. I didn't know you could use Unicode code points, for instance. That must be why it is interpolated.Vadim
06/02/2023, 2:23 AMJRob
06/02/2023, 2:24 AMVadim
06/02/2023, 2:27 AMconsole.log(`Hello ${firstName}, the time right now is ${new Date()}`);
to my knowledge you can not do ☝️ in math-expr.JRob
06/02/2023, 2:38 AM