Hey Everyone,
Hope you are all fine and well!
I know basic liquid in the realm of looker but now I have a more complex task at hand for which I’d love some support. Hopefully some of you could help.
Goal:
What I’d love to achieve is checking a list of potential dimensions (10+ dimensions) that could be used in a query and output the effective list of used dimensions in some sort of array or list or constant.
What I’ve seen as a starter is this from the mentioned source below
(but not sure if this can work):
{% assign potential_grouping_dims = 'field_name_1,field_name_2,field_name_3’ | split: ',' %}
{% assign grouping_dims = ‘’ %}
{% for dim in potential_grouping_dims %}
{% assign assigned_dim_in_query = 'view_name_1.' | append: dim | append: '._in_query' %}
{% if assigned_dim_in_query %}
{% assign grouping_dims = grouping_dims | append: dim | append: ',' %}
{% endif %}
{% endfor %}
Prerequisites:
Other sources found:
Here I found a similar topic. Unfortunatly no solution was provided. Hence, I am hoping for more luck with my topic.
My actual usecase is similar to the one stated in the topic above.
Or is there another, more cleaner way to achieve said goal without using liquid?
Many thanks in advance for your support.
Best,
Jon