[
https://issues.apache.org/jira/browse/KYLIN-5352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
pengfei.zhan updated KYLIN-5352:
--------------------------------
Description:
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:
rule 1, the measure used by more indexes should retain,
rule 2, 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 request content,
* 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.
was:
In some customer environments, we found that two measures with different id
share same parameters. For example:
{code:java}
// code placeholder
{code}
> Allow modifying a healthy model by API without measure'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
> 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:
> rule 1, the measure used by more indexes should retain,
> rule 2, 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 request content,
> * 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)