Forum Discussion

bpeikes's avatar
bpeikes
Cloud Apps
11-30-2022

Data types for Live Data Source

We are using a Live query as a datasource which is based on a query against a table in a redshift cluster. I'm looking at the queries that are being submitted against the RedShift tables, and it appears that Sisense is interpreting one of our columns as a timestamp, instead of a date.

The query simply picks the column types from the query, and is picking up one of our columns as a date time instead of a date. Is there a way to write the query to force sisense to treat a column as a date instead of a datetime?

4 Replies

Replies have been turned off for this discussion
    • bpeikes's avatar
      bpeikes
      Cloud Apps

      We are above 2021.9, the issue is that there doesn't appear to be a way to force Sisense to handle a particular column in a live query as a Date instead of a Date-Time. For instance, the query we use with our live connection looks like:
      SELECT client_id, action, account, session_date
      FROM database.actions

      And the issue is that Sisense is treating session_date as Date-Time instead of a Date.

    • bpeikes's avatar
      bpeikes
      Cloud Apps

      We updated the schema for the underlying table to Date, but refreshing the schema for the Live connection is still showing "Date-Time". The documentation states that "Date" is available since version L2021.9, and we're on 2022.2.0.131.

  • No, you can't change a data type in the Live Model mode.
    Please try to convert the [session_date] field from datetime to date in Redshift. If it won't work try to convert into varchar (e.g. YYYY-MM-DD) - Sisense should map the right data type. I assume you won't be using this field for date based filtering (year/month/day/dynamic period) but just as dimension in your visuals.