Reference
Error Messages

Error message reference

Working with Cube, you might encounter various error messages in logs and API responses. This page lists some of them with some practical advice on mitigation.

Can't find join path

Can't find join path to join 'cube_a', 'cube_b'

Error message above indicates that a query failed because it includes members from cubes that can't be joined in order to generate a valid query to the upstream data source.

Please check that you've defined necessary joins and that they have correct directions.

Also, please consider using views since they incapsulate join paths and completely remove the possibility of the error in question. You might also consider setting public: false on your cubes to hide them from end users.

If you’re building a custom data application, you might use the meta endpoint of the REST API. It groups cubes into connectedComponents to help select those ones that can be joined together.

Primary key is required when join is defined

cube_a cube: primary key for 'cube_a' is required when join is defined
in order to make aggregates work properly

Error message above indicates that you have a cube with joins and pre-aggregations. However, that cube doesn't have a primary key.

When generating SQL queries, Cube uses primary keys to avoid fanouts. A fanout happens when two tables are joined and a single value gets duplicated in the end result, meaning that some values can be double counted.

Please define a primary key dimension in this cube to make joins and pre-aggregations work correctly.

If your data doesn't have a natural primary key, e.g., id, you can define a composite primary key by concatenating most or all of the columns in the table, e.g.:

cubes:
  - name: cube_a
    # ...
 
    dimensions:
      - name: composite_key
        sql: CONCAT(column_a, '-', column_b, '-', column_c)
        type: string
        primary_key: true

Refresh Scheduler Interval Error

{
  "message": "Refresh Scheduler Interval Error",
  "error": "Previous interval #2 was not finished with 60000 interval"
}

Error message above indicates that your refresh worker is overloaded. You probably have a lot of tenants, a lot of pre-aggregations to refresh, or both.

If you're using multitenancy, you'd need to deploy several Cube clusters (each one per a reduced set of tenants) so there will be multiple refresh workers which will work only on a subset of your tenants.

If you're using Cube Cloud, you can use a production multi-cluster that would automatically do this for you.