When using a custom SQL request with a date type filter :
SELECT foo
FROM bar
WHERE timestamp >= {{startdate}}
I have the error :
{"code" 400,
"errors"
[{"domain" "global", "location" "query", "locationType" "other", "message" "14.16 - 14.27: Could not parse '2016-12-01' as a timestamp. Required format is YYYY-MM-DD HH:MM[:SS[.SSSSSS]]", "reason" "invalidQuery"}],
"message" "14.16 - 14.27: Could not parse '2016-12-01' as a timestamp. Required format is YYYY-MM-DD HH:MM[:SS[.SSSSSS]]"}}
Good catch.
Cool : )
Actually custom SQL queries with BigQuery needs some love, it is barely usable in its current form. I can't use field filters either (#3414), standard SQL is not supported (#3012) etc.
Appart from that, Metabase rocks ! can't wait for improved BigQuery support.
I actually ended up fixing this as part of #4325 so the fix will ship as part of our upcoming release, 0.23.0.
The SQL that gets generated now looks like
SELECT x
FROM y
WHERE CAST(z AS timestamp) = timestamp('2017-02-15T08:00:00.000Z')
which works as expected.