I see you already got the reason, from the StackOverflow post. Some additional info from my side: when defining the data model, Kylin will automatically add PK/FK to the dimension list. That explains why you explicitly removed STORESALES.ID but it still appears as a dimension. When adding dimension from the lookup table, please notice there is a "normal" or "derived" option. If "derived", only the "hosting" dimension (FK) will be grouped in the cube. If you want the cube materialize the groupping by that dimension, please set it as "normal" dimension.
Enjoy Kylin! Best regards, Shaofeng Shi 史少锋 Apache Kylin PMC Email: [email protected] Apache Kylin FAQ: https://kylin.apache.org/docs/gettingstarted/faq.html Join Kylin user mail group: [email protected] Join Kylin dev mail group: [email protected] Lev Bronshtein <[email protected]> 于2019年11月12日周二 上午9:30写道: > Hello Kylin users please let me know if you have any information for this > issue > > I am running Apache Kylin apachekylin/apache-kylin-standalone:3.0.0-alpha2 > Docker image. I started out by creating two Hive tables one to record > store sales and one consisting of store metadata > > > > > > > > > > > > > > > > *CREATE TABLE IF NOT EXISTS STORESALES (id INT,food FLOAT,drugs > FLOAT,cosmetic FLOAT,baby FLOAT,reportdate DATE);CREATE TABLE IF NOT EXISTS > STOREMETA (id INT,address STRING,brand STRING,owner STRING);*I then > created a model in which I declared *STORESALES* as my fact table and > *STOREMETA* as a lookup table with left join *STORESALES.ID > <http://STORESALES.ID> = STOREMETA.ID <http://STOREMETA.ID>* I then > declare > > > - STOREMETA.ID > - STOREMETA.ADDRESS > - STOREMET.OWNER > - STOREMETA.BRAND > > > as dimensions. I explicitly deleted *STORESALES.ID <http://STORESALES.ID>* > I also specify measures > > > - STORESALES.DRUGS > - STORESALES.BABY > - STORESALES.COMSETICS > - STORESALES.FOOD > > > and also specified *STORESALES.REPORTDATE* as my partition > > So then I go on to set up my cube. Again I add *STOREMETA[ID, BRAND, > OWNER, NAME]* as dimensions, but for some reason *STOREDATA.ID > <http://STOREDATA.ID>* shows up as a choice for a dimension as well. I > add measures as *MAX_FOOD, MAX_DRUGS, MAX_COSMETICS, MAX_BABY*. The > issues is once I get to Advanced Settings the only options for grouping > available are *STORESALES.ID <http://STORESALES.ID>*. If I manually enter > anything else it disappears from the list. I went back to edit the model > and noticed that *STORESALES.ID <http://STORESALES.ID>* is now in the > list of measures as well. > > Not sure if this is what breaking things for me. Or if my general lack of > experience here is hindering my progress. Please assist. > > P.S. This question has also been posted to stack overflow, feel free to > respond and engage there. It contains screenshots I felt may be relevant > https://stackoverflow.com/questions/58649747/unable-to-create-a-grouping-in-apache-kylin >
