Yes, as Peter mentioned, the hierarchy is just an optimization, not mandantory; so in this case, you can define one hierarchy.
2017-03-15 8:48 GMT+08:00 peter zhang <[email protected]>: > In my opinion hierarchy in kylin is just an optimization option, not like > the normal hierarchy in other OLAP systems. For your case, you can put set > < CITYID, ZONEID, REGIONID > as a hierarchy or a joint dimension. This > setting only affects the pre-group granular also the query and cube build > performance. > Using cuboid <CITYID, ZONEID, REGIONID>, kylin can derive <CITYID, ZONE > ID>, <CITYID, REGIONID> in memory. > > *Below is a SQL analogy, sub-query is kylin's pre-calculated cuboid, > outside group operation process in memory/jvm:* > *SELECT CITYID, ZONEID, agg-func* > * FROM (* > * SELECT CITYID, ZONEID, REGIONID, sum/count/avg* > * FROM t * > * GROUP BY CITYID, ZONEID, REGIONID* > *) subquery* > *GROUP BY CITYID, ZONEID* > > Please kindly correct it if any mistake. > > 2017-03-14 21:09 GMT+08:00 [email protected] < > [email protected]>: > >> Hi, >> In this situation, how should I deal with the hierarchy relations which >> exist the same dimension CITYID. >> Could I just pay attention on the CITYID ZONEID hierarchy ralation,and >> ignore the CITYID REGIONID relation? >> >> the cardinality of these three columns >> cityid 88336, >> zoneid 11134, >> regionid 2692, >> >> thx >> >> ------------------------------ >> [email protected] >> >> >> *From:* ShaoFeng Shi <[email protected]> >> *Date:* 2017-03-13 22:33 >> *To:* user <[email protected]> >> *Subject:* Re: Aggregation group error >> You can have multiple hierarchies, but they should have no overlap. In >> this case, what's the cardinality of these three columns? >> >> 2017-03-13 13:58 GMT+08:00 [email protected] < >> [email protected]>: >> >>> Error Message >>> >>> Aggregation group 0 a dimension exist in more than one hierarchy: >>> [CITYID] >>> >>> Hi, >>> there are three dimensions cityid(城市),regionid(行政区),zoneid(商圈).actually, >>> it forms two hierarchy relations. >>> 1、cityid, regionid >>> 2、cityid, zoneid >>> >>> if I config like this below. when I save the cube it shows error. >>> >>> Could I save the two hierarchy relations? and How Could I solve this >>> problems . >>> >>> >>> Advanced Setting config: >>> >>> Error: >>> >>> ------------------------------ >>> [email protected] >>> >> >> >> >> -- >> Best regards, >> >> Shaofeng Shi 史少锋 >> >> > -- Best regards, Shaofeng Shi 史少锋
