Skip to content

Time dimension returns [object Object] values from mssqlΒ #9488

@LzbnSam

Description

@LzbnSam

Problem
I have a problem with time type with MSSQL source database. In playground I got [object Object] result instead of real dates values.
I am using:

  • MSSQL 2019
  • Latests Cube Core Docker Image

Image

The generated script works fine and returns values.

Image

My cube yaml:

cubes:
  - name: cube_mes_supply
    sql_table: cube.v_mes_supply
    data_source: dwh_reporting_development

    joins: 
      - name: dim_document_status
        relationship: many_to_one
        sql: "{cube_mes_supply}.ATTB = {dim_document_status.operation_id}"

    dimensions:
      - name: id
        sql: id
        type: number
        primary_key: true      

      - name: company_guid
        sql: COMPANY
        type: string

      - name: mars_reason
        sql: mars_reason
        type: string

      - name: is_cross_docking
        sql: IS_CROSS_DOCKING
        type: boolean

      - name: create_date
        sql: create_datetime
        type: time
      
      - name: test_datetimeoffset
        sql: test_datetimeoffset
        type: time

    measures:
      - name: count
        type: count

      - name: quantity
        sql: Quantity
        type: sum

      - name: amount_rub
        sql: Amount_Rub
        type: sum

    pre_aggregations:
      - name: marsReasonIsCrossDockingMeasure
        measures:
          - amount_rub
          - quantity
        dimensions:
          - mars_reason
          - is_cross_docking
        refreshKey:
          every: 10 minute

I think that the problem is that MSSQL returns DATETIMEOFFSET type with nanoseconds.
How can I fix that?

Metadata

Metadata

Assignees

Labels

driver:mssqlIssues relating to the MSSQL driverdriver:mysqlIssues relating to the MySQL/MariaDB driverquestionThe issue is a question. Please use Stack Overflow for questions.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions