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.

Links:

132 questions
1
vote
1 answer

CubeJS - calculated measure based on total measure value for the response

I want to create a calculated measure amountPercentage in CubeJS. I have an amount measure and I want to check how many percentages from the whole amount (sum for all records in response) is in every single record. Let's say I have Products…
Krystian Fras
  • 91
  • 1
  • 2
  • 4
1
vote
1 answer

Cube.js: invalid token

In the server of cubejs, I generated a token by cubejs token -e "180 day". Then I assign it to CUBEJS_API_SECRET in .env; and assign it to const cubejsApi = cubejs(.... Then I launched the backend and the frontend, I got the following error: Invalid…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
1
vote
1 answer

Can't connect to mongodb attlas with cube.js

In cube.js when i try to connect to mongodb atlas I get this error: Error: getaddrinfo ENOTFOUND xxxxx-xxxxx.mongodb.net at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26) my .env…
1
vote
2 answers

Design a counting measure of the element number in a MongoDB array property in cube.js

I'm using cube.js with MongoDB through MongoDB Connector for BI and MongoBI Driver and so far so good. I'd like to have a cube.js numerical measure that counts the element length from a MongoDB array of object nested property. Something like: { …
Luca Anceschi
  • 2,257
  • 3
  • 19
  • 24
1
vote
1 answer

Cube.js time interval best practice

I have table with working time interval. what is the best way to model this in cube.js to allow time dimension queries like total worker working time, between dates, total worker time in day and so on. Thanks! the table looks like: CREATE…
amirw
  • 67
  • 1
  • 5
1
vote
2 answers

One query, multiple date range

I have a query like below : { "measures": [...], "dimensions": [], "timeDimensions": [ { "dateRange": ["2020-01-03", "2020-31-03"] } ] } it returns an array of ONE object for example [{ totalSales :…
Maxime Girou
  • 1,511
  • 2
  • 16
  • 32
1
vote
1 answer

net::ERR_CONNECTION_REFUSED to cube.dv

I'm taking over a website. The previous developer decided to use cube.dev to build the KPI page. But I have no knowledge on it. He showed me once the KPI page worked. But now, when I launch it on my side (https://jsaddin.10studio.tech/kpi), there is…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
1
vote
1 answer

Cube.js unable to join table from different dataSources

In my cube.js server I have 2 tables from different data sources(both of them are postgres). I'm trying to create a join on these tables but get the following error Error: Joins across data sources aren't supported in community edition. Found data…
1
vote
1 answer

Does Cube.js support preAggregations when using Context Variables inside the SQL definition of a cube?

According to the Cube.js documentation, one can define cubes using something called Context Variables, that allows the injection of filters (such as a particular user email) when querying that cube. I haven't tried it yet, but I want to know if this…
1
vote
1 answer

How to improve cubejs preagregations creation process? (its taking too long to build preaggs even with partitionGranularity)

We are having trouble with the preaggregations creation performance. We currently have specific filters for the data for each one of our clients, and we generate different cubes for each one of them by extending a base cube (called Metrics) and…
1
vote
1 answer

How do I query for a measure as a single calculated value (10 days average) and not separated by granularity (daily measure)?

I have a doubt. I currently have a cube with a preAggregation defined with day granularity and some measures A, B, C. The preAggregation works fine when I query using timeDimension with a fixed dateRange and granularity (it retrieves a time series…
1
vote
1 answer

How to use Cube.js without dependenies of AWS services

I am using Cube.js to make graphics with mongodb. For default, the graphs are saved in localStorage of the browser, but to put in a real world, the documentation says that we have to use the aws services to persist the dashboards. Has some manner of…
1
vote
1 answer

Segments in cube js

I want to implement OR filter functionality in cube.js. This link says we can do this by using segments option in cubejs params. How to use segments and what is its purpose? I tried understanding from the website with their 5 lines of documentation…
Pragya Dalal
  • 68
  • 2
  • 9
1
vote
1 answer

Cube.js: Error: ssl is required when using cleartext authentication using MongoDB BI Connector

I have my MongoDB instance set up to use Authentication. I have my Mongo Connect BI setup to use the same authentication, but when I pass these authentication details through Cube.js I get the following error. Error: ssl is required when using…
AntonZ
  • 83
  • 2
  • 7
1
vote
2 answers

Change resultant's key name in cube.js

Currently, I am using the react dashboard for frontend and cube.js for the backend. Result which I get from the backend is in the form of json and each key represents the column of my database. Resultant example: { user.email:"xxx", …
hiren shah
  • 33
  • 6
1 2 3
8 9