I have a use case where we have a number of views, constructed from SQL queries. These queries require a hard-coded condition in a couple of different places in the query (so a few dozen places where this one condition is duplicated across the project). The condition changes frequently, and at the moment there’s a bit of overhead to keep it current.
What I would like to do is have a singular place where I can go to update this value, and have all of my queries reference that place, like in a view or something along those lines, where my query can just be run against the model and get the value as a subquery. However, I haven’t been able to work out how this can be done; setting up the condition as a view/explore and then referencing it in a query run against the model doesn’t seem to work.
Anyone got any advice to get that working, or know of any other feature that might do the job? Any help is appreciated.