Varchar Field Type Changed to Integer, SQL Exception on SUM

I have a dataset created by a direct query against a Timestream table. In that table is a column with Varchar data known to be Integer data. On the dataset prep page we have changed the column data type to Integer, saved and published. The data appears to load fine as i can see rows from the queried table in the preview window at the bottom of the dataset page.

However, when creating a visualization that SUM’s on the integer column I receive a SQL exception:

Error executing query with id "null": line 6:90: Unexpected parameters (varchar) for function 'SUM'. Expected: SUM(double) , SUM(bigint) , SUM(interval day to second) ,

I’m looking for a way to determine why this exception is being thrown and/or fix the issue. Any help would be appreciated!

It appears this ended up being due to a filter that was trying to reference an old field. Once that was cleared up the error went away and the visual loaded.

1 Like