Hi,
My PDTs work fine unless the build is triggered by Looker instead of through an Explore.
I have the following PDT definition:
derived_table: {
sql:
{% if _explore._name != 'cross_channel' or cross_channel.facebook._parameter_value == '1' and _explore._name == 'cross_channel' %}
SELECT min(date_start) as fb_min_date, max(date_start) as fb_max_date
FROM ${facebook_ads.SQL_TABLE_NAME}
{% else %}
SELECT current_date as fb_min_date, NULL as fb_max_date
{% endif %};;
sql_trigger_value: SELECT MAX(date_start) FROM ${facebook_ads.SQL_TABLE_NAME} ;;
partition_keys: ["fb_min_date"]
}
The PDT works fine in the Expore view. I can see it being build when I run a query for the first time:
And I can see it being used afterwards:
I also checked that the table is in BigQuery, where I can query it.
However, my PDT admin dashboard, is full of build errors, also for this specific example:
It looks like the Liquid syntax is causing an SQL error somehow:
and that Looker doesn’t strip away the Liquid tags on triggered build:
These build errors pop up every 5 minutes, so I’m assuming it is because of the triggered build.
Any idea on how to solve this?
I was assuming that a triggered build would build versions of the PDT for each possible parameter combination but that doesn’t seem to be what’s happening.
Thanks!
Hi
I think you can not use liquid or templated logic in PDT.