Skip to content

Commit 8e6b938

Browse files
authored
docs: Overriding title, description, meta, and format on view members (#9518)
1 parent d28333a commit 8e6b938

File tree

1 file changed

+47
-19
lines changed

1 file changed

+47
-19
lines changed

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

Lines changed: 47 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,14 @@ view(`orders`, {
8686
includes: [
8787
{
8888
name: `name`,
89-
alias: `product`
89+
alias: `product`,
90+
title: `My custom product`,
91+
description: `My custom product description`,
92+
format: `number`,
93+
meta: {
94+
some: `custom`,
95+
meta: `data`
96+
}
9097
}
9198
]
9299
},
@@ -120,21 +127,18 @@ views:
120127
includes:
121128
- name: name
122129
alias: product
130+
title: My custom product
131+
description: My custom product description
132+
format: number
133+
meta:
134+
some: custom
135+
meta: data
123136

124137
- join_path: base_orders.users
125138
prefix: true
126139
includes: "*"
127140
excludes:
128141
- company
129-
130-
131-
132-
133-
134-
135-
136-
137-
138142
```
139143
140144
</CodeTabs>
@@ -154,19 +158,38 @@ to list measures, dimensions, or segments you'd like to include into the view.
154158

155159
To include all members from a cube, use the _includes all_ shorthand: `includes: "*"`.
156160
In that case, you can also use the `excludes` parameter to list members that
157-
you'd like to exclude.
161+
you'd like to exclude.
162+
163+
#### `prefix`
164+
165+
If you'd like to prefix exposed members with the cube name, you can do so by setting the
166+
`prefix` parameter to `true`. It will prefix members with the cube name, e.g. `users_city`.
167+
You can use the [`alias` parameter](#alias) to specify a custom prefix.
158168

159169
#### `alias`
160170

161-
Optionally, in case you need to rename some of included members, you can provide
162-
`name` and `alias` parameters.
171+
If you'd like to [rename][ref-dim-name] an included member, you can use the `alias`
172+
parameter.
163173

164-
#### `prefix`
174+
#### `title`
175+
176+
If you'd like to override the [title][ref-dim-title] of a member, you can use the
177+
`title` parameter.
178+
179+
#### `description`
180+
181+
If you'd like to override the [description][ref-dim-description] of a member, you
182+
can use the `description` parameter.
183+
184+
#### `format`
185+
186+
If you'd like to override the [format][ref-dim-format] of a member, you can use the
187+
`format` parameter.
188+
189+
#### `meta`
165190

166-
Optionally, if you'd like to prefix exposed measures, dimensions, or segments
167-
with the cube name, you can use the `prefix: true` parameter. It will prefix
168-
them with the cube name, e.g. `users_city`. You can use the `alias` parameter to
169-
specify a custom prefix.
191+
If you'd like to override the [metadata][ref-dim-meta] of a member, you can use the
192+
`meta` parameter. Note that the `meta` is overridded as a whole.
170193

171194
### `folders`
172195

@@ -369,4 +392,9 @@ The `access_policy` parameter is used to configure [data access policies][ref-re
369392
[ref-ref-dap]: /reference/data-model/data-access-policies
370393
[ref-apis-support]: /product/apis-integrations#data-modeling
371394
[ref-playground]: /product/workspace/playground#viewing-the-data-model
372-
[ref-viz-tools]: /product/configuration/visualization-tools
395+
[ref-viz-tools]: /product/configuration/visualization-tools
396+
[ref-dim-name]: /reference/data-model/dimensions#name
397+
[ref-dim-title]: /reference/data-model/dimensions#title
398+
[ref-dim-description]: /reference/data-model/dimensions#description
399+
[ref-dim-format]: /reference/data-model/dimensions#format
400+
[ref-dim-meta]: /reference/data-model/dimensions#meta

0 commit comments

Comments
 (0)