[
https://issues.apache.org/jira/browse/KYLIN-5352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
pengfei.zhan resolved KYLIN-5352.
---------------------------------
Resolution: Fixed
> Allow modifying a healthy model by API without SimplifiedMeasure's id in
> request
> --------------------------------------------------------------------------------
>
> Key: KYLIN-5352
> URL: https://issues.apache.org/jira/browse/KYLIN-5352
> Project: Kylin
> Issue Type: Improvement
> Components: Modeling
> Affects Versions: 5.0-alpha
> Reporter: pengfei.zhan
> Assignee: pengfei.zhan
> Priority: Major
> Fix For: 5.0-alpha
>
>
> In some customer environments, we found that two measures with different IDs
> share the same parameters. For example:
> {code:java}
> // just show the problem measures
> {
> "name": "measure1",
> "function" : {
> "expression" : "SUM",
> "parameters" : [{
> "type" : "column",
> "value" : "TEST_KYLIN_FACT.PRICE"
> }],
> "returnType" : "double"
> },
> "column" : "PRICE",
> "comment" : "",
> "id" : 100047
> }, {
> "name": "measure2",
> "function" : {
> "expression" : "SUM",
> "parameters" : [{
> "type" : "column",
> "value" : "TEST_KYLIN_FACT.PRICE"
> }],
> "returnType" : "double"
> },
> "column" : "PRICE",
> "comment" : "",
> "id" : 100048
> }
> {code}
> We have fixed this problem by using the id of `SimplifiedMeasure` to
> recognize what we need to do with this model.
> What can we do when we are using the fore-end of Kylin?
> # Go to the model page;
> # Search the measure id on the page of `Model` > `Developers` > `JSON`, and
> record the `parameters` of this measure ;
> # Search by `parameters` content to get the duplicate measure;
> # Search related indexes by these two measure names then decide which
> measure and related indexes to delete.
> Rule of thumb, we usually follow two rules:
> rule1, the measure used by more indexes should retain,
> rule2, the indexes contain more dimensions and measures should retain.
> But What can we do when we are using API to modify a model with the same
> situation? We can get this goal by controlling the content of requests
> (related part, the `SimplifiedMeasure` list).
> * add a measure, no need to input an id of `SimplifiedMeasure`,
> * modify a measure, need to input an id of `SimplifiedMeasure` which equals
> the real id on the to-be-modified model,
> * remove a measure, this measure should not in the `SimplifiedMeasure` list.
>
> However, in most cases, the models are normal ones. That's to say, there is
> no need to use the id of `SimplifiedMeasure` when we are using the API.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)