You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kylin.apache.org by "liubo@fcyun.com" <li...@fcyun.com> on 2017/09/15 07:26:39 UTC

lookup table just had the name of FK in fact table, how to create the cube dimension without the names columns in lookup table?

hi users,
Here are the dimensions in my cube.  company_id and store_id are just primary key in lookup tables and the FK in fact table T_DEAL_HISTORY.
I just want to select company_name,store_name in SQL.
And I don't want COMPANY_NAME,STORE_NAME be dimenions, If I don't include them in dimension, then I can't query them later.

How to solve this situation?




thanks very much~




liubo@fcyun.com

Re: lookup table just had the name of FK in fact table, how to create the cube dimension without the names columns in lookup table?

Posted by ShaoFeng Shi <sh...@apache.org>.
You can define them as "extended column", which is a measure in kylin. The
extended column will be saved in value, not on rowkey.

Another alternative way is, use them as dimension, but define COMPANY_ID
and COMPANY_NAME be a joint, STORE_ID and STORE_NAME be a joint, because
their cardinality is near the same.

2017-09-15 15:26 GMT+08:00 liubo@fcyun.com <li...@fcyun.com>:

> hi users,
> Here are the dimensions in my cube.  company_id and store_id are just
> primary key in lookup tables and the FK in fact table T_DEAL_HISTORY.
> I just want to select company_name,store_name in SQL.
> And I don't want COMPANY_NAME,STORE_NAME be dimenions, If I don't include
> them in dimension, then I can't query them later.
>
> How to solve this situation?
>
>
>
>
> thanks very much~
>
>
> ------------------------------
> liubo@fcyun.com
>



-- 
Best regards,

Shaofeng Shi 史少锋