You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pages/product/apis-integrations/mdx-api.mdx
+11-50Lines changed: 11 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,15 @@ directly to the upstream data source.
53
53
- If some queries still go to the upstream data source, it should respond with a
54
54
subsecond latency. Consider tuning the concurrency and quotas to achieve that.
55
55
56
+
### Measure format
57
+
58
+
The MDX API respects the [`format` parameter][ref-measure-format] of measures so that the
59
+
values are displayed accordingly in Excel, i.e., `percent` formats values as percentages
60
+
and `currency` formats values as monetary values.
61
+
62
+
Currency formatting is locale-aware and responds to the language configuration set via
63
+
the `CUBE_XMLA_LANGUAGE` environment variable.
64
+
56
65
## Using MDX API with Excel
57
66
58
67
<InfoBox>
@@ -180,59 +189,10 @@ This is going to be harmonized in the future.
180
189
181
190
</InfoBox>
182
191
183
-
## Formatting
184
-
185
-
MDX API supports formatting for measures to control how values are displayed in Excel.
186
-
187
-
### Percent format
188
-
189
-
You can format measures as percentages using the `percent` format type:
190
-
191
-
```yaml
192
-
cubes:
193
-
- name: orders
194
-
sql_table: ORDERS
195
-
196
-
measures:
197
-
- name: completion_rate
198
-
sql: "COUNT(CASE WHEN {CUBE}.status = 'completed' THEN 1 END) / COUNT(*)"
199
-
type: number
200
-
format: percent
201
-
```
202
-
203
-
### Currency format
204
-
205
-
You can format measures as currency using the `currency` format type:
206
-
207
-
```yaml
208
-
cubes:
209
-
- name: orders
210
-
sql_table: ORDERS
211
-
212
-
measures:
213
-
- name: total_revenue
214
-
sql: "{CUBE}.amount"
215
-
type: sum
216
-
format: currency
217
-
```
218
-
219
-
Currency formatting is locale-aware and responds to the language configuration set via the `CUBE_XMLA_LANGUAGE` environment variable. This variable accepts either [Microsoft LCID (Locale Identifier)][link-lcid] values or language tags. The default value is `1033` (English - United States).
220
-
221
-
For example, to display currency values using the Netherlands locale (Euro with comma as decimal separator), you can use either:
222
-
223
-
```bash
224
-
# Using LCID
225
-
CUBE_XMLA_LANGUAGE=1043
226
-
227
-
# Using language tag
228
-
CUBE_XMLA_LANGUAGE=nl-NL
229
-
```
230
-
231
192
## Authentication and authorization
232
193
233
194
Authentication and authorization work the same as for the [SQL API](/product/apis-integrations/sql-api/security).
Copy file name to clipboardExpand all lines: docs/pages/product/caching/using-pre-aggregations.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -270,7 +270,7 @@ This technique, together with multi-router Cube Store approach, allows you to ac
270
270
271
271
In general, it's better to lean towards less partitions, as long as you are satisfied with query speed.
272
272
273
-
For optimal _querying performance_, partitions should be small enough so that the Cube Store workers can process them in less than 100 milliseconds.
273
+
For optimal _querying performance_, partitions should be small enough so that a Cube Store worker can read (scan) a partition in less than 100 milliseconds.
274
274
The best way to optimize this is to start from a relatively large partition (e.g., yearly or no partition at all if data permits),
275
275
check what the [flame graph][ref-flame-graph] in Query History shows, then iterate as needed.
0 commit comments