I’m having trouble with templated liquid filters that span across 2 tables. I have filter A and B working as they should since they are both coming from the same table, but when I bring in a new table, there seems to be a disconnect between the two tables because when I select a field in filter A, B filters but nothing changes for filter C.
What am I doing wrong?
filter: A_filter {
type: string
sql: EXISTS (
SELECT A
FROM ${Table_1.SQL_TABLE_NAME}
where 1= 1
AND {% condition B_filter %} ${123.B} {% endcondition %}
) ;;
}
filter: B_filter {
type: string
sql: EXISTS (
SELECT B
FROM ${Table_1.SQL_TABLE_NAME}
where 1= 1
AND {% condition A_filter %} ${123.A} {% endcondition %}
) ;;
}
filter: C_filter {
type: string
suggest_dimension: C
sql: EXISTS (
SELECT C
FROM ${Table_2.SQL_TABLE_NAME}
where 1= 1
AND {% condition A_filter %} ${123.A} {% endcondition %}
AND {% condition B_filter %} ${123.B} {% endcondition %}
) ;;
}