The way to delete a PDT is to remove any reference of it from your model, or models if you have multiple models in one project. Once you’ve removed any references to the PDT, Looker will drop the PDT in it’s next table clean up process.
There are a few ways to properly remove the reference to the PDT.
First make sure to remove/comment out all joins for this PDT. If you don’t, the LookML validator will throw a bunch of errors.
Then do one of the following:
Comment out all lines in the PDT’s view file.
- include: *.lookmlstatement with explicit includes for each view file excluding the PDT’s view file. Since PDTs have a distinct table for each model file they are included in, this is the best method if you want a PDT to only be used in one of your models.
Delete the PDT view file (probably not best since you may want to use the PDT at a future date).