Auto Delete PDTs

low_priority
done
reply
pdt
(Sam Gladio) #1

I’m using persist_for and sql_trigger_value to create PDTs for some complex queries in TeraData. But enabling PDTs create permanent tables in the Database with Prefix LC$ which occupies some Database storage. So, how to have these tables deleted once the Data is fetched and moved to looker instance for caching.

Please provide an example LookML code in case the change has to be made in the code.

0 Likes

(Izzy) #2

Looker should automatically clear out old PDTs from the scratch schema when they’re no longer needed— If you’re seeing LC$ tables hang around, that’s a sign something is going a bit wacky with PDT regeneration. LC$ tables should actually be renamed to LR$ (the final table that’s queried), not actually copied.

Are the PDTs regenerating as normal, and just not deleting? Or are they also having strange regeneration behavior?

0 Likes