Using SPLIT_PART in dimension

I have a table in snowflake with a column that produces a string like this “144514490704288__LOOKUP__1933330251567369140”.

In my view I only want the second number so I created a dimension like this:

bad5e717-b7a6-478f-a852-a70f21f24298.png
magic_text is the column that contains the string as seen in example above

When I try to use the explore and accessing this dimension:
 

48b71bcb-6afd-4efb-92fe-75aa60a9b8cf.png

Does LookML just not support the split_part function?

Can anyone tell me how to use split_part and still make a dimension?

I am aware of a workaround using SUBSTRING which does work except the first number could be of variable length and substring uses hardcoded integer positions so it is not applicable here. We must search for the __LOOKUP__ substring and extract all the integers that follow it.

Solved Solved
0 1 1,372
1 ACCEPTED SOLUTION

Use ticks ‘__LOOKUP__’ instead of quotes around “__LOOKUP__”.

View solution in original post

1 REPLY 1

Use ticks ‘__LOOKUP__’ instead of quotes around “__LOOKUP__”.

Top Labels in this Space
Top Solution Authors