Question

[Custom Field] Extracting key pay from a field


Hello,

I am trying to create a custom field that extract data from a field (assuming the field is called “my_info”). Inside this field contains “name=steven&country=Australia”.

I tried to create a custom field with the following expression:
substring(${data.my_info}, position(${data.my_info}, "country") + 8 , 9)

But the problem with this approach is the length of the value always fixed to 9 characters. Some countries has lesser character and some has longer.

What is the possible solution for this? Due to restricted LookML, was thinking if this could be solved by just using custom field.

Many thanks in advance!


0 replies

Be the first to reply!

Reply