Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
108 views

Apache Superset SQL query filtering

I'm new to Cube / Superset so bear with me. I've the following cube defined in Cube: cubes: - name: items sql: > SELECT DISTINCT ... FROM ... WHERE lt.package_org_id = '{{ ...
auburg's user avatar
  • 1,517
0 votes
0 answers
47 views

Can't join two tables in Cube.js through Superset

I've the following query i'm trying to get to work in superset SQL LAB: SELECT count(lt.id) AS correctcount FROM groups g LEFT JOIN learner_tests lt ON lt....
auburg's user avatar
  • 1,517
0 votes
0 answers
43 views

How to validate cube.js schema when you have jinja syntax {{ }} in sql of the cubes

what is the go-to way to validate the schema with npx cubejs-cli validate -p config/schema when you have a cube like this example from the docs https://cube.dev/docs/reference/data-model/context-...
Kaizendae's user avatar
  • 1,063
0 votes
1 answer
68 views

Cube core on K8S GCP with Snowflake Generate Data Model YAML does not create anything

I have connected my Cube instance to a Snowflake database and I can see the tables and select them. When I do that the "Generate Data Model" turns on and when I click it I can select YAML. ...
Fabio's user avatar
  • 625
0 votes
0 answers
52 views

How to configure a separate Database for storing Pre-Aggregations in Cube.js?

I have a PostgreSQL database testdb (hosted on 10.55.55.55) as my data source, where I have read-only access. I also have another PostgreSQL database cubejs running on the same server where Cube.js is ...
YRKNM's user avatar
  • 1
0 votes
0 answers
23 views

Unaligned relative date range

How to define Relative date range in time dimension to query exactly last 24 hours with no time unit alignment? Assuming current time is 2024-12-10T15:35:48.000. How to query data from 2024-12-09T15:...
PeterS's user avatar
  • 220
1 vote
1 answer
602 views

How to configure Cube.js pre-aggregations to refresh every 12 hours or at a specific time (e.g., 4:00 AM UTC)?

I’m working on a Cube.js project where I need to configure pre-aggregations to refresh at regular intervals, specifically every 12 hours or at a specific time like 4:00 AM UTC. I’ve set up a cube to ...
Abdellah-ELAAROUB's user avatar
0 votes
2 answers
60 views

Filter values as argument in functions

How to model a cube and query to filter rows containing a value in array columns using Amazon Athena? select * from my_table where contains(my_array_column,'foobar') So I can write a filter like: { ...
PeterS's user avatar
  • 220
1 vote
2 answers
753 views

Docker images unable to talk to each other

I am trying to make two images depend on each other. One acts as the master and the other one is a worker. Here are the two Dockerfiles FROM cubejs/cubestore:v0.31.58-arm64v8 ENV CUBESTORE_WORKERS=...
boomchickawawa's user avatar
0 votes
0 answers
385 views

How to modify Cube.js schema to fix "column must appear in the GROUP BY clause or be used in an aggregate function" error?

I encounter an issue using Cube.js with avg measures. This is an example of two cubes, "Posts" and "Comments", with the following schema: const schemaName = 'my_schema' cube('...
ecavard's user avatar
  • 151
1 vote
1 answer
341 views

Unable to establish a connection between Apache Superset and cube js using SQL API

We have deployed cube.js using docker in one of the Linux machines (Ubuntu). We have deployed Apache Superset in another Linux machine (Ubuntu). We are trying to establish a connection between "...
Thirumalai Muthu Palani's user avatar
0 votes
1 answer
560 views

Cube.dev - how to have the parameter "today date" in rolling window?

I have a PostgreSQL database in which users can order from a start date to an end date. I want to know, for each day, how many users would be able to order. Let's make an example, given: id from to A ...
EuberDeveloper's user avatar
0 votes
0 answers
140 views

How to use dynamic username for postgresql database connection in power bi based on user

I am using Power BI with cube.js as the data source. The connection to Cube is set up using the PostgreSQL connector in Power BI. I am trying to figure out, how I can change the username, which is ...
Martin Brummerstedt's user avatar
0 votes
1 answer
783 views

Why am I getting an "Invalid token" when requesting the cube.js API?

I have deployed cube.js via a Helm chart I've created to an AWS EKS cluster. One of the first errors I encountered was that the environment variable CUBEJS_API_SECRET is required. In a docker-...
user4601931's user avatar
  • 5,324
0 votes
1 answer
672 views

How to integrate cube.js API in simple javascript code?

How to integrate cube.js API in simple javascript code? I just want to use cube.js API in my simple html and js page. Can anybody help me with that? In cube.js docs, they integrate it with react, vue ...
Mukhtar Hussain's user avatar
2 votes
1 answer
345 views

How to cancel/ abort pending cubejs api request [closed]

I am working with Cube.Js in react. When i am changing the the route (Navigating to another page), I need to cancel the running request. How can we achieve this. Do Cube.js has any provision to cancel ...
SHUBHAM GOSWAMI's user avatar
0 votes
2 answers
611 views

Cube.js This Week/This Month

Is it possible to calculate some metrics (count, sum) for a specific time period like Today/This Week/This Month/Last Month in Cube.js. Is rollingWindow what I need? I tried it but it doesn't return ...
Muhamed Muhamedagić's user avatar
0 votes
1 answer
106 views

Frontend integration on React 18.1.0

I'm not able to write the code inside the index.js file. I wrote the code as per the code sandbox section of cube docs. It sends a console warning that my app may work as React 17. When I followed 18....
Dhiman Saha's user avatar
1 vote
1 answer
484 views

How to access current security context within a driver in cube.js

I'm working on a custom cube.js database driver that uses a private http service which accepts arbitrary, raw sql and returns the result as json. The http service uses Authorization header to identify ...
riyaz-ali's user avatar
  • 9,132
0 votes
1 answer
591 views

On The Fly Dynamic Schemas

I am looking through Dynamic Cube Creation and was wondering - is there a way to get a cube created post Cube process startup? In this use case, we have multiple schemas being created on the fly as ...
steamrolla's user avatar
  • 2,491
1 vote
1 answer
1k views

How do I use cube.js to define my own schemas

I want to build schema file from my frontend app just like what happens in cube.js playground in dev mode. Is there any possibility to do so?
Chathuranga Priyadarshana Kath's user avatar
1 vote
1 answer
354 views

Cube.js React Hook React.useCallback has a missing dependency: 'pivotConfig'. +

I've been trying to create a simple dashboard with Cube.js using windows 10 and Mysql version 8. I originally tried a Js backend, fought with the install for a few days, then tried a docker install ...
T2029's user avatar
  • 65
1 vote
2 answers
2k views

cube.js join compile "error does not match any of the allowed types"

I have 2 tables, one contains daily data and the other contains attributes that I would like to use for segmenting data. I got the following Error when I try to compile my cube.js schema. cube.js ...
bfmcneill's user avatar
  • 127
1 vote
0 answers
700 views

Cube.js <QueryBuilder> default value of timeDimensions

I am using the Cube.js react client to change the default timeDimension, dateRange, and granularity of my Query. import { QueryBuilder } from '@cubejs-client/react' here is what timeDimension property ...
Ezra Tsai's user avatar
3 votes
1 answer
576 views

cube.js playground not plotting data correctly

I am using cube.js to compare the change in data over the time by plotting it as a line graph . Step 1 : After generating cube.js schema successfully , data looks like this: Step 2 : Now, while I am ...
Asraful's user avatar
  • 1,290
4 votes
0 answers
1k views

Cubejs : Error: 19488:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:

I am trying to connect Cubejs to MongoDB through MongoDB BI Connect. My mongosqld command is as follows ./mongosqld --config mongosqld.conf -u useradmin -p xxxx --auth --sslMode requireSSL --...
user3863585's user avatar
1 vote
0 answers
292 views

Login failed while connecting to SQL Server database from Cube js

This is the issue I see in the terminal while i run npm run dev I am trying to connect to a SQL Server database. I have changed some settings for my user 'sjeswara' using SSMS which might facilitates ...
Suraj Jeswara's user avatar
2 votes
1 answer
336 views

Cube.js React QueryBuilder : "This month" and "Weekly" not getting data from start of week if month changes mid-week

I understand why "This month" combined with "Weekly" doesn't get the full week's data if the month starts at the middle. For example the week starting September 27th still shows as ...
programmer.john.may's user avatar
1 vote
1 answer
605 views

Can cube.js be used to access raw data as well as aggregated data?

For example, if I have a Postgres table with columns for sensor_id, temperature and time_recorded , would I still be able to generate a chart that shows temperature (y) over time (x) ?
equatorial_daydreamer's user avatar
1 vote
1 answer
554 views

cube.js docker image for aarch64/arm64

I am new to cube.js and trying to see if I can use it for a small personal project (mostly for learning). I'm looking for a docker image that runs on Rasberrypi 64 bit - can anyone point me in the ...
user12891's user avatar
0 votes
2 answers
1k views

Filter data dynamically based on a hierarchical user id in cube.js

I have two tables called Writers and Publications where there is a foreign key publications.writer_id = writers.id Writers id (int) parent_id (int) role (varchar) name (varchar) path (ltree) 1 ADMIN ...
equatorial_daydreamer's user avatar
1 vote
2 answers
678 views

Error: unexpected response Forbidden Issue with cubejs

I am running the below command to create the service in cubejs but facing forbidden error. Command : cubejs create d3-dashboard -d postgres npm WARN deprecated @hapi/[email protected]: Switch to 'npm ...
Ramachandran Periyasamy's user avatar
4 votes
2 answers
565 views

How to format dates on frontend

I am using the React (recharts) integration of cube and was wondering how to format dates or "weeks" instead of having the full ISOdate. For example Week 39 instead of 2021-09-27T00:00:00....
programmer.john.may's user avatar
3 votes
2 answers
782 views

How to use cube.js to connect to specific redis

If I want to connect cube.js to my own built redis, what should I do. I use CUBEJS_REDIS_URL which is claimed by official document. So, for example, if my own redis port is 31.71.195.218. Should I ...
Ezra Tsai's user avatar
2 votes
1 answer
4k views

getting this error while trying to run cube js

I'm getting this error while trying to run cube js with the default command in the getting started docs. I've started this in a folder and running it in docker. Warning. There is no cube.js file. ...
Chen's user avatar
  • 291
3 votes
1 answer
1k views

Undefined Security Context in extended cube using AbstractCube.sql(). CubeJS

I have an Extended Cube that the sql attribute is based on the BaseCube/AbstractCube. The Base Cube uses the SECURITY_CONTEXT in its sql attribute. When I query the extended cube I get TypeError: ...
Camilo Velasquez's user avatar
1 vote
1 answer
2k views

cube.js: send raw sql query to cube server

Is it possible to send a raw sql request to a cubejs server? The cubejs server would send it as is to the db it is connected to? I have some edge cases where I would like to let the client send raw ...
discuss_e's user avatar
1 vote
1 answer
444 views

cube.js: subquery in FROM clause

How to do a subquery in the FROM clause in cube.js. There is only one table. SELECT col_a FROM (SELECT col_a, col_b FROM table_name WHERE col_c=some_val ORDER BY time DESC) WHERE col_b=...
discuss_e's user avatar
1 vote
0 answers
321 views

CubeJS inflated count values due to LEFT JOINs on related cubes

Consider a database schema of the following: An Entity table. A SpecializedEntity table, which has exactly 0 or 1 record for each record in Entity, and a nullable LookupValueId column. A LookupValue ...
Andrew Keller's user avatar
0 votes
1 answer
1k views

How to run cubeJS-Backend application using express

I am trying to run cubeJs-backend application using express. I have added code changes like below. I have created cube.js file with the below code const express = require('express'); const path = ...
Rewa's user avatar
  • 1
1 vote
2 answers
891 views

How do I create measures that are not aggregated data?

I have a simple table which has a number(say sales) as one column which describes the sales done for a product. I also have ~25 products. Now, I want to import this sales as a measure into cube. ...
rspenpal's user avatar
0 votes
1 answer
482 views

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

Using mongo Bi connector via Atlas as source database Using mysql for pre-aggregation
Atishay's user avatar
  • 175
1 vote
1 answer
305 views

Left outer Join in Cube JS

I have a requirement to join two tables in cube js. First table has list of customers. Second table has list orders with customer ids with purchase date. I have to display the total orders placed by ...
Priadarshan Mega's user avatar
0 votes
1 answer
875 views

Security Context with several elements on CubeJS

Currently working on Cube.JS and I'm building a cube within I want to restrict the data to an user based on his gender. So I end up with : cube(`Data`, { sql: `select * from my_table where ${...
Bilel's user avatar
  • 3
0 votes
1 answer
801 views

Filter/update already rendered chart.js in react.js

I'm new here, because I have decided to dive into programming, so I can fill free time between treatments in the hospital. I'm absolutely new in the programming field with no previous coding ...
user avatar
0 votes
1 answer
988 views

CubeJS Multitenant: How to use COMPILE_CONTEXT as users access the server with different Tokens?

We've been getting started with CubeJS. We are using BiqQuery, with the following heirarchy: Project (All client) Dataset (Corresponding to a single client) Tables (Different data-types for a ...
Ben Holmquist's user avatar
1 vote
2 answers
526 views

Plotting multiple lines on a Cube.js line graph

Imagine a simple line graph plotting a person count (y-axis) against a custom time value (x-axis), as such: Suppose you have another dimension, say specific groupings of people, how do you draw a ...
Atticus's user avatar
  • 195
3 votes
1 answer
1k views

How to pass dynamic values in sql in cube.js schema?

Somewhere I want status=2 or status<3. Instead of writing separate schemas, how to reuse by passing dynamic values to the status field in SQL? cube(`OrderFacts`, { sql: `SELECT * FROM orders ...
Tanvi Gupta's user avatar
0 votes
0 answers
104 views

Is `<` an unsupported expression in rollupJoin's?

I am trying to use a rollupJoin pre-aggregation as per this example but instead of joining on an ID I am attempting to join using dates, i.e. something like: joins: { Weeks: { relationship: '...
Atticus's user avatar
  • 195
1 vote
0 answers
378 views

Cube.js schema for Nested Field in Elasticsearch index

Consider I have the following data in my Elastic index. "hits" : [ { "_index" : "cubepoc", "_type" : "_doc", "_id" : "i1", "...
Vignesh G's user avatar
  • 149