KNOWLEDGE BASE

Error: "ERROR 4286: Operator does not exist: timestamp" When Nesting Date Functions with Live Vertica Connection


Published: 13 Jan 2017
Last Modified Date: 16 Feb 2017

Issue

When attempting to nest date functions with a live connection to Vertica (e.g. DATEPART within a DATEADD calculation), the following error might occur:
"ERROR 4286: Operator does not exist: timestamp   time HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts."

Environment

  • Tableau Desktop
  • Tableau Server
  • Vertica (Live connection)

Resolution

Option 1

Upgrade to Tableau Desktop 10.0.7 or 10.1.5. For more information, see Upgrading Tableau Desktop.

Option 2

Wrap the nested portion of the function in INT().  
For example, DATEADD('date_part', (DATEPART(date_part, [Date1]), [Date2]) can be edited to DATEADD('date_part', INT((DATEPART(date_part, [Date1])), [Date2])

Cause

The query to Vertica is not casting elements of the query as an integer.  For example, DATEADD requires an integer for the interval argument, however this was not occurring when that argument was a DATEPART function.

Additional Information

This behavior is related to a known issue (ID: 603107) that has been fixed in a recent version of Tableau Desktop. 
Did this article resolve the issue?