You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "hit-lacus (via GitHub)" <gi...@apache.org> on 2023/07/05 02:30:52 UTC

[GitHub] [kylin] hit-lacus commented on a diff in pull request #2133: KYLIN-5604, KYLIN-5598 Documentation

hit-lacus commented on code in PR #2133:
URL: https://github.com/apache/kylin/pull/2133#discussion_r1252474350


##########
website/docs/restapi/model_api/model_management_api.md:
##########
@@ -1178,3 +1178,92 @@ curl -X GET \
 </datasource>
 ```
 
+### Add aggregate groups
+
+- `PUT http://host:port/kylin/api/index_plans/agg_groups`
+
+- Introduced in: 5.0
+
+- HTTP Header
+
+  - `Accept: application/vnd.apache.kylin-v4-public+json`
+  - `Accept-Language: en`
+  - `Content-Type: application/json;charset=utf-8`
+
+- HTT`P Body: JSON Object`
+
+  - `project` - `required` `string`, project name
+  - `model` - `required` `string`, model name
+  - `aggregation_groups` - `required` `JSON Object[]`, agg group json array, can add multiple agg groups
+    - `dimensions` - `required` `array[string]`, dimension array, must be in database.table format, and the added dimension must have been added as a dimension in the model
+    - `measures` - `optional` `array[string]`, measure array, the added measure name is the measure name defined in the model, case-sensitive
+    - `mandatory_dims` - `optional` `array[string]`, mandatory dimension array, the dimensions that must be included in the index generated by the aggregate group
+    - `hierarchy_dims` - `optional` `array[array[string]]`, hierarchy dimension array, the dimensions that can be optimized according to the hierarchical relationship in the index generated by the aggregate group, a set of hierarchy dimensions in an array
+    - `joint_dims` - `optional` `array[array[string]]`, joint dimension array, the dimensions that must also be included in the index generated by the aggregate group, a set of joint dimensions in an array
+    > **NOTICE**: `mandatory_dims` 、`hierarchy_dims` 、`joint_dims` must be in `dimensions`, and any dimension can only be set once in mandatory dimension, hierarchy dimension or joint dimension.
+    - `dim_cap` - `optional` `int`, Maximum number of dimension combinations(MDC) for a single aggregate group, positive integer
+  - `global_dim_cap` - `optional` `int`, global MDC in this request, priority global_dim_cap < dim_cap
+  - `restore_deleted_index` - `optional` `boolean`, When the indexes generated by the aggregate group have been deleted, whether to generate these indexes again when adding the aggregate group, the default is false, which means not to add.
+
+- Curl Request Example
+
+  ```sh
+  curl -X PUT \
+  'http://localhost:7070/kylin/api/index_plans/agg_groups' \
+  -H 'Accept: application/vnd.apache.kylin-v4-public+json' \
+  -H 'Accept-Language: cn' \
+  -H 'Authorization: Basic QURNSU46S1lMSU4=' \
+  -H 'Content-Type: application/json;charset=utf-8'
+  -d '{"project":"ssb", 
+       "model":"testNewName", 
+       "aggregation_groups":[
+          {
+            "dimensions":[
+                "CUSTOMER_DETAILS.IMei",
+                "CUSTOMER_DETAILS.REGION",
+                "CUSTOMER_DETAILS.BALANCE"
+            ],
+            "measures":[
+                "ME2"
+            ],
+            "mandatory_dims":[
+                "CUSTOMER_DETAILS.reGION"
+            ],
+            "hierarchy_dims":[
+                [
+                    "CUSTOMER_DETAILS.Imei"
+                ]
+            ],
+             "joint_dims":[
+                [
+                    "CUSTOMER_DETAILS.BALANCE"
+                ]
+            ],
+            "dim_cap": 4
+          }
+       ],
+       "global_dim_cap":3,
+       "restore_deleted_index":false
+  }'
+  ```
+
+- Response Details
+  - code - string, response code, succeed: 000, failed: 999
+  - removed_layouts_size - The number of indexes to delete
+  - added_layouts_size - The number of indexes to add
+  - recovered_layouts_size - The number of deleted indexes in the generated indexes, when restore_deleted_index = true, these indexes will be added
+
+- Response Details

Review Comment:
   Response Details or Response Example?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kylin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org