Tableau query for dates failing against Postgres backed Virtual Dataset

Attempting to run the following query:

SELECT CAST({fn TRUNCATE(EXTRACT(YEAR FROM “foobar”.“week”),0)} AS INTEGER) AS “yr_week_ok”
FROM “@dremioadmin”.“foobar” “foobar”
GROUP BY CAST({fn TRUNCATE(EXTRACT(YEAR FROM “foobar”.“week”),0)} AS INTEGER)

And am getting an error in the profile on the truncate function. Week in the database is a Date field.

Hello @kylehayes, can you attach the query profile? It will contain the full error stack. This is the Postgres source where you enabled “Use legacy dialect”, correct?

Correct, same source.55f4adfc-acb6-4334-b50a-043be76fd259.zip (11.0 KB)