Allow persist with to listen to multiple datagroups

done
cache
normal_priority
reply

#1

Hi,

I have an explore of a PDT that joins other PDTs with different SQL triggers. I’d ideally like cache to be cleared when either the base explore PDT is updated or any of the joined in PDTs update.

Essentially I’d like:

explore: pdt_a
   persist_with: a_sql_trigger OR b_sql_trigger OR c_sql_trigger
join: b
join: c

I don’t think creating one SQL trigger with let’s say max date from all 3 tables would work. For example, if max date from a is 1/1 and b is 1/3, max date is 1/3. if max date from a then changes to 1/2, sql trigger value is still 1/3.

Any ideas?

Thanks,
Tim


(Izzy) #2

I think you’re right that something like your example would be the most useful implementation/solution, but I bet you could get a little more creative with your trigger value to get something that works without any changes to the product.

If you do something like

SELECT MAX(extract('epoch' from table1.date))
+MAX(extract('epoch' from table2.date))
+MAX(extract('epoch' from table3.date))

That would change the value every time one of the tables changes, regardless of what the values are. Might not be the best example, but something along those lines…?


#3

Ahh good idea, thanks. Will try that.