Skip to content

pre-aggregations on Oracle not created #10834

@esisilvestri

Description

@esisilvestri

I am running Cube Core using the Oracle Connector in a local kubernetes cluster. Normal queries run fine but now I wanted to start using pre-aggregations to improve performance of the queries. I have defined one pre-aggregation and cube picks it up and tries to create the files but always fails. This happens in both production and development modes.

I am getting two different error messages. If i have buildRangeStart and buildRangeEnd defined then I get:

Error: Unable to detect column types for pre-aggregation on empty values in readOnly mode

and

TypeError: Cannot read properties of null (reading 'length')

If I don't define those two variables then I only get the second error message

Both of thes ehappen when it tries to download the Query Results. I was looking for these error messages and it seems that these happen when the query rewturs no rows.

The problem is though that when i copy the query that it is running and run it manually against the datasource I get around 170k per partition.

WHen I use the trino connector with the same database then the pre-aggregations are created correctly but quereis run much slower so i would like to use the oracle connector if possible.

This is the define dpre-aggregation:

    pre_aggregations:
      - name: invoices_testing
        dimensions:
          - CUBE.price_condition_code
          - CUBE.rep_code,
          - CUBE.customer_number,
          - product.section_code
          - product.family_code
        measures:
          - CUBE.sales_amount
          - CUBE.quantity
        refresh_key:
          every: 1 day
          incremental: true
          update_window: 4 weeks
        time_dimension: CUBE.invoice_date
        granularity: month
        partition_granularity: month
        type: rollup
        external: true
        build_range_start:
          sql: SELECT CURRENT_DATE - INTERVAL '3' month FROM DUAL
        build_range_end:
          sql: SELECT CURRENT_DATE FROM DUAL

**Version: 1.6.44

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions