Skip to content

How to get a real table name for external: false pre-aggregations? #10141

@pnedelko

Description

@pnedelko

Problem
I created a pre-aggregation with the flag external: false and would like to get an SQL query, which I could run myself (in BigQuery).

Unfortunately Cube.js playground and cubeApi.sql() return an SQL query with a table, that doesn't exist.

Cube.js returns table: dev_pre_aggregations.hubspot_companies_preaggtest
But the real table name in BigQuery: dev_pre_aggregations.hubspot_companies_preaggtest_uzm0qrjf_ecn5d0k1_1khj9ae

Question: How to get the real table name through the Cube.js API?

Related Cube.js generated SQL

SELECT
  `hubspot_companies__id` `hubspot_companies__id`,
  `hubspot_companies__properties_name` `hubspot_companies__properties_name`
FROM
  dev_pre_aggregations.hubspot_companies_preaggtest AS `hubspot_companies__preaggtest`
GROUP BY
  1,
  2
ORDER BY
  1 ASC
LIMIT
  10000

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionThe 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