@@ -64,12 +64,12 @@ cubes:
6464 - name : organizations
6565 relationship : many_to_one
6666 sql : " {CUBE.organization_id} = {organizations.id}"
67-
67+
6868 measures :
6969 - name : count
7070 type : count
7171 sql : id
72-
72+
7373 dimensions :
7474 - name : organization_id
7575 sql : organization_id
7979 - name : created_at
8080 sql : created_at
8181 type : time
82-
82+
8383 - name : country
8484 sql : country
8585 type : string
@@ -339,7 +339,7 @@ cube(`extended_order_facts`, {
339339cubes :
340340 - name : order_facts
341341 sql_table : orders
342-
342+
343343 measures :
344344 - name : count
345345 type : count
@@ -386,6 +386,40 @@ cube(`extended_order_facts`, {
386386});
387387```
388388
389+ ### <--{"id" : " Parameters" }--> public
390+
391+ <InfoBox >
392+
393+ In previous versions of Cube, this property was called ` shown ` .
394+
395+ </InfoBox >
396+
397+ The ` public ` property is used to manage the visibility of a cube. Valid values
398+ for ` public ` are ` true ` and ` false ` . When set to ` false ` , this cube ** cannot**
399+ be queried through the API. Defaults to ` true ` .
400+
401+ <CodeTabs >
402+
403+ ``` javascript
404+ cube (` orders` , {
405+ sql_table: ` public.orders` ,
406+ public: false ,
407+ });
408+ ```
409+
410+ ``` yaml
411+ cubes :
412+ - name : orders
413+ sql_table : public.orders
414+ public : false
415+ ` ` `
416+
417+ </CodeTabs>
418+
419+ To learn more about using ` public` to control visibility based on security
420+ context, read the [Controlling access to cubes and views
421+ recipe][ref-recipe-control-access-cubes-views].
422+
389423# ## <--{"id" : "Parameters"}--> refresh_key
390424
391425Cube's caching layer uses `refresh_key` queries to get the current version of
@@ -570,33 +604,6 @@ cubes:
570604
571605</CodeTabs>
572606
573- ### <--{"id" : "Parameters"}--> shown
574-
575- The ` shown` property is used to manage the visibility of a cube. Valid values
576- for `shown` are `true` and `false`.
577-
578- <CodeTabs>
579-
580- ` ` ` javascript
581- cube(` orders`, {
582- sql_table : ` orders` ,
583- shown : false,
584- });
585- ```
586-
587- ``` yaml
588- cubes :
589- - name : orders
590- sql_table : orders
591- shown : false
592- ` ` `
593-
594- </CodeTabs>
595-
596- To learn more about using ` shown` to control visibility based on security
597- context, read the [Controlling access to cubes and views
598- recipe][ref-recipe-control-access-cubes-views].
599-
600607### <--{"id" : "Parameters"}--> sql
601608
602609The ` sql` parameter specifies the SQL that will be used to generate a table that
@@ -1027,14 +1034,14 @@ value for different users. It may change however for different tenants.
10271034
10281035` ` ` javascript
10291036cube(` users`, {
1030- sql_table : ` user_${COMPILE_CONTEXT.securityContext .deployment_id}.users` ,
1037+ sql_table : ` user_${COMPILE_CONTEXT.security_context .deployment_id}.users` ,
10311038});
10321039```
10331040
10341041``` yaml
10351042cubes :
10361043 - name : users
1037- sql_table : " user_{COMPILE_CONTEXT.securityContext .deployment_id}.users"
1044+ sql_table : " user_{COMPILE_CONTEXT.security_context .deployment_id}.users"
10381045` ` `
10391046
10401047</CodeTabs>
0 commit comments