Skip to content

Commit

Permalink
docs: Tiny edits
Browse files Browse the repository at this point in the history
  • Loading branch information
igorlukanin committed Sep 6, 2024
1 parent 7d537c7 commit ae17e5b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 1 addition & 2 deletions docs/pages/guides/style-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ This style guide is intended to be used by:

## Syntax

- Default to [YAML syntax][ref-syntax-model] for data modeling. Use JavaScript
syntax for dynamic data models only.
- Default to [YAML syntax][ref-syntax-model] for data modeling.
- Use [snake case][ref-syntax-naming] when using either YAML or JavaScript
syntax.
- Follow the recommendations on [YAML syntax][self-yaml] and [SQL
Expand Down
12 changes: 9 additions & 3 deletions docs/pages/product/data-modeling/syntax.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ model

Cube supports two ways to define data model files: with [YAML][wiki-yaml] or
JavaScript syntax. YAML data model files should have the `.yml` extension,
whereas JavaScript data model files should end with `.js`.
whereas JavaScript data model files should end with `.js`. You can mix YAML and
JavaScript files within a single data model.

<CodeTabs>

Expand All @@ -63,11 +64,15 @@ cubes:
</CodeTabs>
You define the data model statically or build [dynamic data
You can define the data model statically or build [dynamic data
models][ref-dynamic-data-models] programmatically. YAML data models use
[Jinja and Python][ref-dynamic-data-models-jinja] whereas JavaScript data
models use [JavaScript][ref-dynamic-data-models-js].
It is [recommended][ref-style-guide] to default to YAML syntax because of its
simplicity and readability. However, JavaScript might provide more flexibility
for dynamic data modeling.
## Naming
Common rules apply to names of entities within the data model. All names must:
Expand Down Expand Up @@ -586,4 +591,5 @@ defining dynamic data models.
[wiki-yaml]: https://en.wikipedia.org/wiki/YAML
[link-snowflake-listagg]: https://docs.snowflake.com/en/sql-reference/functions/listagg
[link-bigquery-stringagg]: https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#string_agg
[link-sql-udf]: https://en.wikipedia.org/wiki/User-defined_function#Databases
[link-sql-udf]: https://en.wikipedia.org/wiki/User-defined_function#Databases
[ref-style-guide]: /guides/style-guide

0 comments on commit ae17e5b

Please sign in to comment.