Questions tagged [cube.js]

For questions specific to the open source modular framework for building analytical web applications called "Cube.js". Where possible also include a tag for the framework specific "Cube.js" wrapper that you may be utilizing. E.g. [reactjs], [vue.js], etc.

Filter by
Sorted by
Tagged with
0 votes
0 answers
65 views

How to put Cubejs Playground behind Authentication

In my non-prod environment of cubejs, we have playground running and we see that playground runs without any authentication. I want to have Playground behind auth. I went through cubejs doc and it ...
Vikulp Bansal's user avatar
0 votes
0 answers
59 views

CubeJS - Use Subqueries in queryRewrite

I have an application in CubeJS which will receive a JWT with a user_id claim. The table that contains this also has a list of ids from another table. The idea is to use a subquery so the user can ...
andrepz's user avatar
  • 495
0 votes
0 answers
58 views

Dynamic table name in cube.js generated sql queries

How can I dynamically change table name in the sql statements generated by cubejs? I query open search via sql interface. Our index name consists of name + date partition, e.g. transactions_2023_01_31....
PeterS's user avatar
  • 183
0 votes
0 answers
65 views

Cube JS dashboard app failing to load dashboard

I'm trying to make a basic dashboard with cube.js (which I am new to). When clicking the "Add to Dashboard" button in the GUI for a chart, it comes up with an error saying that the dashboard ...
Jack Gee's user avatar
  • 136
0 votes
0 answers
11 views

How to solve Actuals + Budget requirement

This is for a financial application using cube.js. Actuals and Budget are in separate tables, each with Time and Account as dimensions. Suppose I would create 2 cubes, one for Actuals and one for ...
AllenLu's user avatar
0 votes
0 answers
91 views

Can we Connect Cubejs As Analysis service in Excel?

I want to use CubeJS as Analysis service in Excel just like we do with SSAS and Power BI. Is there any possibility for that? I couldn't find anything in documentation regarding that. Thanks in advance....
Hassan Akhlaq's user avatar
1 vote
1 answer
292 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
158 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
0 votes
1 answer
138 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
229 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 ...
EuberDeveloper's user avatar
0 votes
0 answers
82 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
263 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,041
0 votes
1 answer
254 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
1 vote
0 answers
172 views

How to cancel/ abort pending cubejs api request

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
1 answer
256 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
98 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
237 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
  • 8,782
0 votes
1 answer
247 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,413
1 vote
1 answer
724 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
321 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
1k 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
  • 125
1 vote
0 answers
538 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
455 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,261
3 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
245 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
269 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
374 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
288 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
891 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 ...
equatorial_daydreamer's user avatar
1 vote
2 answers
527 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
452 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
575 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
2k 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
  • 281
3 votes
1 answer
714 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
985 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
335 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
253 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
690 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
606 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
381 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
230 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
608 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
740 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 ...
tatsuo_mori's user avatar
0 votes
1 answer
599 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
395 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
  • 157
3 votes
1 answer
927 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
71 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
  • 157
1 vote
0 answers
287 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
  • 151
1 vote
1 answer
508 views

how to address error cubejs 'From members are not found ... Please make sure join fields are referencing dimensions instead of columns.'

I have the Error: From members are not found in [] for join {"join":{"relationship":"belongsTo"},"from":"Conversations","to":"Advisers&...
ManSB's user avatar
  • 11
0 votes
1 answer
78 views

Serverless Cube.js - No messages published to SNS

Trying to turn a containerized Cube.js deployment into a serverless one. I’m getting Continue wait on every API call, and I notice the cubejsProcess lambda is never invoked. I checked SNS reachability ...
Bananin's user avatar
  • 69