How to reference the latest PDT's in an SQL query?

So we have PDT’s that are refreshing quite often in the company I work at. In addition to this, we need to query these PDT’s from outside looker, say through python.

Problem is that when building queries in Looker Develop it provides the full name of the PDT, the structure is something like:

pdt_database.lr$yu0631641312338859_table_name

And then a new one is generated within a given time frame with a difference UUID string before the table_name.

My question is, how can I build a query, that automatically references the latest build PDT for pdt_database.table_name without having to look up the UUID string to insert, ideally something like:
pdt_database.{LATEST}_table_name.

Kind regards,

0 1 241
1 REPLY 1

Dawid
Participant V
Top Labels in this Space
Top Solution Authors