Skip to content

Commit

Permalink
docs: Extract the page for "matching pre-aggregations", add the page …
Browse files Browse the repository at this point in the history
…for "querying the data model", document `CUBEJS_DB_QUERY_LIMIT` (cube-js#8100)
  • Loading branch information
igorlukanin authored and JichaoS committed May 7, 2024
1 parent 8bff41c commit a494dcc
Show file tree
Hide file tree
Showing 17 changed files with 503 additions and 557 deletions.
4 changes: 2 additions & 2 deletions docs/pages/product/apis-integrations/graphql-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ following limitations:
- No support for the [WebSockets transport][ref-websockets].
- No support for [subscriptions to changes][ref-subscriptions].
- No support for referencing [segments][ref-segments] in queries.
- No support for [`compareDateRange` queries][ref-compare-date-range].
- No support for [compare date range queries][ref-compare-date-range].
- No support for querying [data model metadata][ref-metadata].
- No ability to apply a [pivot config][ref-pivot-config] on the front-end.

Expand Down Expand Up @@ -239,7 +239,7 @@ to our query as follows:
[ref-ref-graphql-api]: /reference/graphql-api
[ref-websockets]: /product/apis-integrations/rest-api/real-time-data-fetch#web-sockets
[ref-subscriptions]: /product/apis-integrations/rest-api/real-time-data-fetch#client-subscriptions
[ref-compare-date-range]: /product/apis-integrations/rest-api/query-format#time-dimensions-format
[ref-compare-date-range]: /product/data-modeling/queries#compare-date-range-query
[ref-metadata]: /reference/rest-api#v1meta
[ref-pivot-config]: /reference/frontend/cubejs-client-core#pivotconfig
[ref-segments]: /reference/data-model/segments
5 changes: 4 additions & 1 deletion docs/pages/product/apis-integrations/javascript-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ as a [chart](/reference/frontend/cubejs-client-core#chart-pivot) or as a
**Simplify work with complex query types.** You can build
[Drill Down](/reference/frontend/cubejs-client-core#drill-down) queries and
[decompose](/reference/frontend/cubejs-client-core#decompose) the results of
[compareDateRange](/product/apis-integrations/rest-api/query-format#time-dimensions-format)
[compare date range queries][ref-compare-date-range]
or [Data Blending](/product/data-modeling/concepts/data-blending) queries.

[Learn more](/reference/frontend/cubejs-client-core) in the documentation for
Expand Down Expand Up @@ -95,3 +95,6 @@ yarn add @cubejs-client/core
Now you can build your application from scratch or connect to one of our
[supported data visualization tools](/product/configuration/visualization-tools).
You can also [explore example applications](/guides/examples) built with Cube.


[ref-compare-date-range]: /product/data-modeling/queries#compare-date-range-query
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ as a [chart](/reference/frontend/cubejs-client-core#chart-pivot) or as a
**Simplify work with complex query types.** You can build
[Drill Down](/reference/frontend/cubejs-client-core#drill-down) queries and
[decompose](/reference/frontend/cubejs-client-core#decompose) the results of
[compareDateRange](/product/apis-integrations/rest-api/query-format#time-dimensions-format)
[compare date range queries][ref-compare-date-range]
or [Data Blending](/product/data-modeling/concepts/data-blending) queries.

[Learn more](/reference/frontend/cubejs-client-core) in the documentation for
Expand Down Expand Up @@ -106,3 +106,6 @@ yarn add @cubejs-client/core @cubejs-client/ngx
Now you can build your application from scratch or connect to one of our
[supported data visualization tools](/product/configuration/visualization-tools).
You can also [explore example applications](/guides/examples) built with Cube.


[ref-compare-date-range]: /product/data-modeling/queries#compare-date-range-query
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ as a [chart](/reference/frontend/cubejs-client-core#chart-pivot) or as a
**Simplify work with complex query types.** You can build
[Drill Down](/reference/frontend/cubejs-client-core#drill-down) queries and
[decompose](/reference/frontend/cubejs-client-core#decompose) the results of
[compareDateRange](/product/apis-integrations/rest-api/query-format#time-dimensions-format)
[compare date range queries][ref-compare-date-range]
or [Data Blending](/product/data-modeling/concepts/data-blending) queries.

[Learn more](/reference/frontend/cubejs-client-core) in the documentation for
Expand Down Expand Up @@ -113,3 +113,6 @@ yarn add @cubejs-client/core @cubejs-client/react
Now you can build your application from scratch or connect to one of our
[supported data visualization tools](/product/configuration/visualization-tools).
You can also [explore example applications](/guides/examples) built with Cube.


[ref-compare-date-range]: /product/data-modeling/queries#compare-date-range-query
5 changes: 4 additions & 1 deletion docs/pages/product/apis-integrations/javascript-sdk/vue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ as a [chart](/reference/frontend/cubejs-client-core#chart-pivot) or as a
**Simplify work with complex query types.** You can build
[Drill Down](/reference/frontend/cubejs-client-core#drill-down) queries and
[decompose](/reference/frontend/cubejs-client-core#decompose) the results of
[compareDateRange](/product/apis-integrations/rest-api/query-format#time-dimensions-format)
[compare date range queries][ref-compare-date-range]
or [Data Blending](/product/data-modeling/concepts/data-blending) queries.

[Learn more](/reference/frontend/cubejs-client-core) in the documentation for
Expand Down Expand Up @@ -111,3 +111,6 @@ yarn add @cubejs-client/core @cubejs-client/vue3
Now you can build your application from scratch or connect to one of our
[supported data visualization tools](/product/configuration/visualization-tools).
You can also [explore example applications](/guides/examples) built with Cube.


[ref-compare-date-range]: /product/data-modeling/queries#compare-date-range-query
36 changes: 17 additions & 19 deletions docs/pages/product/apis-integrations/rest-api/query-format.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,18 @@ A Query has the following properties:
It is an array of objects in [timeDimension format.](#time-dimensions-format)
- `segments`: An array of segments. A segment is a named filter, created in the
data model.
- `limit`: A row limit for your query. The default value is `10000`. The maximum
allowed limit is `50000`. If you'd like to request more rows than the maximum
allowed limit, consider using [pagination][ref-recipe-pagination].
- `total`: If set to `true`, Cube will return the total number of rows for a
query. The default value is `false`.
- `limit`: A [row limit][ref-row-limit] for your query.
- `total`: If set to `true`, Cube will run a [total query][ref-total-query] and
return the total number of rows as if no row limit or offset are set in the query.
The default value is `false`.
- `offset`: The number of initial rows to be skipped for your query. The default
value is `0`.
- `order`: An object, where the keys are measures or dimensions to order by and
their corresponding values are either `asc` or `desc`. The order of the fields
to order on is based on the order of the keys in the object.
- `timezone`: All time based calculations performed within Cube are
timezone-aware. This property is applied to all time dimensions during
aggregation and filtering. It isn't applied to the time dimension referenced
in a `dimensions` query property unless granularity or date filter is
specified. Using this property you can set your desired timezone in
[TZ Database Name](https://en.wikipedia.org/wiki/Tz_database) format, e.g.:
`America/Los_Angeles`. The default value is `UTC`.
- `timezone`: A [time zone][ref-time-zone] for your query. You can set the
desired time zone in the [TZ Database Name](https://en.wikipedia.org/wiki/Tz_database)
format, e.g., `America/Los_Angeles`.
- `renewQuery`: If `renewQuery` is set to `true`, Cube will renew all
[`refreshKey`][ref-schema-ref-preaggs-refreshkey] for queries and query
results in the foreground. However, if the
Expand Down Expand Up @@ -536,8 +531,8 @@ provides a convenient shortcut to pass a dimension and a filter as a
specified it's equivalent to passing two of the same dates as a date range.
You can also pass a string with a [relative date
range][ref-relative-date-range], for example, `last quarter`.
- `compareDateRange`: An array of date ranges to compare a measure change over
previous period
- `compareDateRange`: An array of date ranges to compare measure values. See
[compare date range queries][ref-compare-date-range] for details.
- `granularity`: A granularity for a time dimension. It supports the following
values `second`, `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`.
If you pass `null` to the granularity, Cube will only perform filtering by a
Expand All @@ -556,10 +551,10 @@ provides a convenient shortcut to pass a dimension and a filter as a
}
```

You can use compare date range queries when you want to see, for example, how a
metric performed over a period in the past and how it performs now. You can pass
two or more date ranges where each of them is in the same format as a
`dateRange`
You can use [compare date range queries][ref-compare-date-range] when you want
to see, for example, how a metric performed over a period in the past and how it
performs now. You can pass two or more date ranges where each of them is in the
same format as a `dateRange`:

```javascript
// ...
Expand Down Expand Up @@ -608,7 +603,6 @@ refer to its documentation for more examples.

</InfoBox>

[ref-recipe-pagination]: /guides/recipes/queries/pagination
[ref-client-core-resultset-drilldown]:
/reference/frontend/cubejs-client-core#result-set-drill-down
[ref-schema-ref-preaggs-refreshkey]:
Expand All @@ -621,3 +615,7 @@ refer to its documentation for more examples.
/reference/data-model/pre-aggregations#time_dimension
[ref-relative-date-range]: #relative-date-range
[chrono-website]: https://github.com/wanasit/chrono
[ref-row-limit]: /product/data-modeling/queries#row-limit
[ref-time-zone]: /product/data-modeling/queries#time-zone
[ref-compare-date-range]: /product/data-modeling/queries#compare-date-range-query
[ref-total-query]: /product/data-modeling/queries#total-query
1 change: 1 addition & 0 deletions docs/pages/product/caching/_meta.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
"getting-started-pre-aggregations": "Getting started with pre-aggregations",
"using-pre-aggregations": "Using pre-aggregations",
"matching-pre-aggregations": "Matching pre-aggregations",
"lambda-pre-aggregations": "Lambda pre-aggregations",
"running-in-production": "Running in production"
}
Loading

0 comments on commit a494dcc

Please sign in to comment.