0

On a Redash application instance backed by a Snowflake database, I've got a dashboard set up with a number of queries, each of which take a parameter of type date named startDate.

Each of my queries are coded to apply the dashboard's selected date via WHERE clauses like:

WHERE created_at >= '{{ startDate }}'

In most cases, this is working fine.

However, when on my dashboard, for the startDate parameter, I select the special value Yesterday (instead of a specific date), some (but not all) of my queries display an error instead of displaying any data: Error running query: 100035 (22007): Timestamp 'd_yesterday' is not recognized.

What does this error mean, and how can I fix it?

Jon Schneider
  • 25,758
  • 23
  • 142
  • 170

1 Answers1

0

This problem occurs when on the affected queries, the parameter still has its default type of text, instead of having been changed to type date.

The error is occurring because choosing the special date value "Yesterday" on the dashboard only works with date-type parameters -- not text-type parameters.

Changing the parameter type to date on each of the individual queries, saving those changes, and then refreshing the dashboard, should fix the problem.

Jon Schneider
  • 25,758
  • 23
  • 142
  • 170
  • 1
    and speaking to the error message, it's expecting a string that can be parsed as a date thus 'YYYY-MM-DD' type thing, and 'd_yesterday` does not match the default date format of the session/user. – Simeon Pilgrim Aug 20 '20 at 05:28