Using SPLIT_PART in dimension

  • 30 June 2021
  • 1 reply

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:

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:


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.


Best answer by Chris_Tinnon 15 July 2021, 20:25

View original

This topic has been closed for comments

1 reply

Userlevel 1

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