Skip to content

Commit 6bc438d

Browse files
committed
Add docs
1 parent c97f99a commit 6bc438d

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

docs/pages/reference/data-model/dimensions.mdx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,14 @@ examples.
618618

619619
</ReferenceBox>
620620

621+
<WarningBox>
622+
623+
Custom granularities are supported for the following [data sources][ref-data-sources]:
624+
Amazon Athena, Amazon Redshift, DuckDB, Databricks, Google BigQuery, ClickHouse, Microsoft SQL Server, MySQL, Postgres, and Snowflake.
625+
Please [file an issue](https://github.com/cube-js/cube/issues) if you need support for another data source.
626+
627+
</WarningBox>
628+
621629
For each custom granularity, the `interval` parameter is required. It specifies
622630
the duration of the time interval and has the following format:
623631
`quantity unit [quantity unit...]`, e.g., `5 days` or `1 year 6 months`.
@@ -713,4 +721,5 @@ cube(`orders`, {
713721
[ref-time-dimensions]: /reference/data-model/types-and-formats#time-1
714722
[link-date-time-string]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format
715723
[ref-custom-granularity-recipe]: /guides/recipes/data-modeling/custom-granularity
716-
[ref-ref-hierarchies]: /reference/data-model/hierarchies
724+
[ref-ref-hierarchies]: /reference/data-model/hierarchies
725+
[ref-data-sources]: /product/configuration/data-sources

packages/cubejs-schema-compiler/src/adapter/BaseQuery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3110,7 +3110,7 @@ export class BaseQuery {
31103110
*/
31113111
// eslint-disable-next-line @typescript-eslint/no-unused-vars
31123112
dateBin(interval, source, origin) {
3113-
throw new Error('Date bin function is not implemented');
3113+
throw new Error('Date bin function, required for custom time dimension granularities, is not implemented for this data source');
31143114
// Different syntax possible in different DBs
31153115
}
31163116

0 commit comments

Comments
 (0)