Comments (1)
I'm sorry to open this issue again @paveltiunov but I just tested it on v0.35.30 with the same exact schema as above (except FILTER_PARAMS.orders.
fixed to correct path FILTER_PARAMS.poc_orders
) and the issue is still there. Or I'm missing something.
Hash of the image:
% kubectl get -o json pod cube-api-f9f858f89-w75vw | grep "imageID"
"imageID": "docker.io/cubejs/cube@sha256:a3d4763f4bc1871c1d187f7a2b6ab7c4783b89c4a563c45673f2240656422b61",
From inside the container:
root@cube-api-f9f858f89-w75vw:/cube# grep version package.json
"version": "0.35.30",
Is there any way I can help here?
Schema.js
again:
cube(`poc_orders`, {
public: false,
sql: `
SELECT co.*
FROM cubes.orders co
WHERE ${FILTER_PARAMS.poc_orders.work_date.filter("addTimestamp")}
`,
joins: {
poc_daily_metrics: {
relationship: `many_to_one`,
sql: `
${branch_uid} = ${poc_daily_metrics.branch_uid}
AND DATE(${work_date}) = ${poc_daily_metrics.work_date}
`,
},
},
measures: {
count: {
type: 'count',
},
count2: {
type: 'count',
},
something: {
sql: `${count} * ${poc_daily_metrics.finished_orders_count}`,
type: 'number'
},
measure_working_fine: {
sql: `${something}/${count}`,
type: 'number',
},
measure_causing_error: {
sql: `${something}/${count2}`,
type: 'number',
},
},
dimensions: {
uid: {
sql: `${CUBE}.uid`,
type: `string`,
primaryKey: true,
},
branch_uid: {
sql: `${CUBE}.branchUid`,
type: `string`,
},
work_date: {
sql: `${CUBE}.addTimestamp`,
type: `time`,
},
},
})
cube(`poc_daily_metrics`,
{
public: false,
sql: `
SELECT
DATE(startTimestamp) as workDate,
branchUid,
COUNT(*) as finishedCount
FROM cubes.activities
WHERE (
${FILTER_PARAMS.poc_orders.work_date.filter("startTimestamp")}
)
GROUP BY 1, 2
`,
measures: {
finished_orders_count: {
sql: `${CUBE}.finishedCount`,
type: 'sum',
},
},
dimensions: {
id: {
sql: `${work_date} || ${branch_uid}`,
type: `string`,
primaryKey: true,
},
branch_uid: {
sql: `${CUBE}.branchUid`,
type: `string`,
},
work_date: {
sql: `${CUBE}.workDate`,
type: `time`,
},
}
}
)
Part of the console log:
2024-05-13T12:19:30+02:00 Error while querying: a60d1d55-c7f8-430a-8c17-d167fcb83d3b-span-1 (267ms)
2024-05-13T12:19:30+02:00 {
2024-05-13T12:19:30+02:00 "queueId": 9,
2024-05-13T12:19:30+02:00 "processingId": 9,
2024-05-13T12:19:30+02:00 "queueSize": 0,
2024-05-13T12:19:30+02:00 "queryKey": [
2024-05-13T12:19:30+02:00 "SELECT q_0.`poc_orders__work_date_day`, `poc_orders__count` * `poc_daily_metrics__finished_orders_count`/count(`poc_orders`.uid) `poc_orders__measure_causing_error` FROM (SELECT DATETIME_TRUNC(DATETIME(`main__poc_orders`.addTimestamp, 'UTC'), DAY) `poc_orders__work_date_day`, count(`main__poc_orders`.uid) `poc_orders__count` FROM (\n SELECT co.*\n FROM cubes.orders co\n WHERE ((1 = 1))\n ) AS `main__poc_orders`\nLEFT JOIN (\n SELECT \n DATE(startTimestamp) as workDate,\n branchUid,\n COUNT(*) as finishedCount\n FROM cubes.activities\n WHERE ( \n ((1 = 1))\n )\n GROUP BY 1, 2 \n ) AS `main__poc_daily_metrics` ON \n `main__poc_orders`.branchUid = `main__poc_daily_metrics`.branchUid \n AND DATE(`main__poc_orders`.addTimestamp) = `main__poc_daily_metrics`.workDate\n GROUP BY 1) as q_0 INNER JOIN (SELECT `keys`.`poc_orders__work_date_day`, sum(`poc_daily_metrics_key__poc_daily_metrics`.finishedCount) `poc_daily_metrics__finished_orders_count` FROM (SELECT DISTINCT DATETIME_TRUNC(DATETIME(`poc_daily_metrics_key__poc_orders`.addTimestamp, 'UTC'), DAY) `poc_orders__work_date_day`, `poc_daily_metrics_key__poc_daily_metrics`.workDate || `poc_daily_metrics_key__poc_daily_metrics`.branchUid `poc_daily_metrics__id` FROM (\n SELECT co.*\n FROM cubes.orders co\n WHERE ((1 = 1))\n ) AS `poc_daily_metrics_key__poc_orders`\nLEFT JOIN (\n SELECT \n DATE(startTimestamp) as workDate,\n branchUid,\n COUNT(*) as finishedCount\n FROM cubes.activities\n WHERE ( \n ((1 = 1))\n )\n GROUP BY 1, 2 \n ) AS `poc_daily_metrics_key__poc_daily_metrics` ON \n `poc_daily_metrics_key__poc_orders`.branchUid = `poc_daily_metrics_key__poc_daily_metrics`.branchUid \n AND DATE(`poc_daily_metrics_key__poc_orders`.addTimestamp) = `poc_daily_metrics_key__poc_daily_metrics`.workDate\n ) AS `keys`\nLEFT JOIN (\n SELECT \n DATE(startTimestamp) as workDate,\n branchUid,\n COUNT(*) as finishedCount\n FROM cubes.activities\n WHERE ( \n ((1 = 1))\n )\n GROUP BY 1, 2 \n ) AS `poc_daily_metrics_key__poc_daily_metrics` ON `keys`.`poc_daily_metrics__id` = `poc_daily_metrics_key__poc_daily_metrics`.workDate || `poc_daily_metrics_key__poc_daily_metrics`.branchUid\n GROUP BY 1) as q_1 ON (q_0.`poc_orders__work_date_day` = q_1.`poc_orders__work_date_day` OR (q_0.`poc_orders__work_date_day` IS NULL AND q_1.`poc_orders__work_date_day` IS NULL)) ORDER BY 1 ASC LIMIT 10000",
2024-05-13T12:19:30+02:00 [],
2024-05-13T12:19:30+02:00 []
2024-05-13T12:19:30+02:00 ],
2024-05-13T12:19:30+02:00 "queuePrefix": "SQL_QUERY_STANDALONE_default",
2024-05-13T12:19:30+02:00 "timeInQueue": 7,
2024-05-13T12:19:30+02:00 "addedToQueueTime": 1715595570426
2024-05-13T12:19:30+02:00 }
2024-05-13T12:19:30+02:00 Error: Unrecognized name: poc_orders at [1:112]
2024-05-13T12:19:30+02:00 at new ApiError (/cube/node_modules/@google-cloud/common/build/src/util.js:73:15)
2024-05-13T12:19:30+02:00 at /cube/node_modules/@google-cloud/bigquery/build/src/bigquery.js:1071:23
2024-05-13T12:19:30+02:00 at /cube/node_modules/@google-cloud/common/build/src/util.js:380:25
2024-05-13T12:19:30+02:00 at Util.handleResp (/cube/node_modules/@google-cloud/common/build/src/util.js:159:9)
2024-05-13T12:19:30+02:00 at /cube/node_modules/@google-cloud/common/build/src/util.js:479:22
2024-05-13T12:19:30+02:00 at onResponse (/cube/node_modules/retry-request/index.js:228:7)
2024-05-13T12:19:30+02:00 at /cube/node_modules/teeny-request/src/index.ts:333:11
2024-05-13T12:19:30+02:00 at processTicksAndRejections (node:internal/process/task_queues:95:5)
...
2024-05-13T12:19:39+02:00 --
2024-05-13T12:19:39+02:00 {
2024-05-13T12:19:39+02:00 "measures": [
2024-05-13T12:19:39+02:00 "poc_orders.measure_causing_error"
2024-05-13T12:19:39+02:00 ],
2024-05-13T12:19:39+02:00 "timeDimensions": [
2024-05-13T12:19:39+02:00 {
2024-05-13T12:19:39+02:00 "dimension": "poc_orders.work_date",
2024-05-13T12:19:39+02:00 "granularity": "day"
2024-05-13T12:19:39+02:00 }
2024-05-13T12:19:39+02:00 ],
2024-05-13T12:19:39+02:00 "order": {
2024-05-13T12:19:39+02:00 "poc_orders.work_date": "asc"
2024-05-13T12:19:39+02:00 }
2024-05-13T12:19:39+02:00 }
2024-05-13T12:19:39+02:00 --
2024-05-13T12:19:39+02:00 {
2024-05-13T12:19:39+02:00 "securityContext": {
2024-05-13T12:19:39+02:00 "iat": 1715591181,
2024-05-13T12:19:39+02:00 "exp": 1715677581
2024-05-13T12:19:39+02:00 }
2024-05-13T12:19:39+02:00 }
2024-05-13T12:19:39+02:00 Error: Unrecognized name: poc_orders at [1:112]
from cube.
Related Issues (20)
- Data blending approach via SQL API
- [Data Source Connectivity Request] for Apache Doris HOT 1
- SQL API failed - sum + case when HOT 1
- SQL API query errors when comparing two columns HOT 1
- SQL API fails when aggregating using EXTRACT on a timestamp HOT 5
- Metabase - SQL_PUSH_DOWN custom Expression Float32 not supported
- Significant Compilation Time Increase with Growing Number of Model Files - Incremental Compilation Possible? HOT 2
- Bigquery timestamps with 6 digits now break pre-aggregations HOT 1
- 500 Error When Calling the /cubejs-api/v1/meta Endpoint HOT 1
- Multi tenancy in single database with different app ids
- `prefix` or `public` keys break `meta` HOT 1
- Materialized Views not listed
- SQL API: Incorrect dateRange when filtering on a custom DATE_TRUNC column HOT 1
- SQL API: Error with subquery, but only when there is no SQL LIMIT
- queryRewrite with multiple data sources HOT 2
- Add Trino and Presto to the data source connection wizard
- `One or more Primary key is required for '${cubeName}' cube` error HOT 1
- Is Semantic Layer Sync (going to be) supported in core? HOT 1
- Metabase Share Expression is useless with Cube
- Column "<snake_cased column name>" does not exist (when referring base cube field in blended cube) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cube.