Solved

Extend with Liquid Parameters

  • 2 August 2022
  • 1 reply
  • 83 views

Hello!

 

I would like to build an explore (loans) that is almost exactly the same as another explore (orders) but incorporates nuanced logic for how it joins to another core view (customers).

Basically if I could have two of the same views in a model file but be able to call them different explore names. 

It seems the best way to go about this is create another view file named loans which incorporates the extend functionality (i.e.  extends: [orders]). The problem with this is that in orders, there are some dimensions using liquid SQL (parameter that changes the currency amount from local to dollar): 

${TABLE}.gross_amount{% parameter parameters.currency_display %} / @{cents}

I am running into issues with LookML validation saying that for the new loans view, “Variable not found "parameters" and points to the lines of code that are related to dimensions with Liquid SQL in them. 

Does extending another view break when the original view has dimensions using Liquid? If so, what other workarounds would there be so that I can effectively copy a view, call it another explore name so that both can exist in the same model file? 

 

Let me know if anything is unclear. Thank you!!

icon

Best answer by mallorypiedmont 3 August 2022, 17:33

View original

This topic has been closed for comments

1 reply

Solved:

You need to add the right query parameters to the explore of extended view. 

Reference: https://docs.looker.com/reference/explore-reference