Rebuilding Incremental PDTs

I’m trying to force rebuild an incremental PDT from scratch without needing a change to the PDT’s lookml. The use case is that the upstream data had corrections made to it, and I want the PDTs to regen from scratch to pick up all the changes.

I tried using the “Rebuild Derived Tables & Run” option from an Explore, but it behaves as described on this page:

In the case of incremental PDTs, the Rebuild Derived Tables & Run option triggers the build of a new increment. 

What I’m looking for is an action that will drop the entire table and rebuild the PDT as if it never existed. I tried manually dropping the PDT table from the scratch schema directly in the DB (Redshift, if it matters), but Looker seems to continue to think that table name exists and errors out in the Explore / SQL query.

The only way around this I’ve found so far is to commit a change to production that disables the incremental PDT (remove the increment_key), let Looker rebuild and reenable the increment_key.

So how do I force rebuild an incremental PDT from scratch without needing a change to the PDT’s lookml ?

Edit to add: the upstream corrections were a one-time action. I don’t need to automate this task.

0 2 1,551
2 REPLIES 2

masutaka
Participant IV

If it is a one-time event, it is quicker to manually delete the PDT.

I understand this is very late reply, but I feel it is OK to have this answer on the record.

This can be done via API Call and pass force_full_incremental value as true along appropriate model and view names. 

https://developers.looker.com/api/explorer/4.0/methods/DerivedTable/start_pdt_build?sdk=py

 

Top Labels in this Space
Top Solution Authors