You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kylin.apache.org by my is mine <79...@qq.com> on 2020/05/25 06:14:25 UTC
回复: multi fact tables
i have already join the two tables,i mean when i use sum,i calcutated the duplicated rows,how i avoid this
------------------ 原始邮件 ------------------
发件人: "yongjie zhao"<yongjie.zhao@gmail.com>;
发送时间: 2020年5月25日(星期一) 下午2:12
收件人: "user"<user@kylin.apache.org>;
主题: Re: multi fact tables
try creating table view in Hive.
On Mon, May 25, 2020 at 2:00 PM my is mine <7946816@qq.com> wrote:
i join two fact tables with a wide fact tables,but there are duplicated rows in it, it affects the funcation like sum, any suggest, how i sum the column
Re: multi fact tables
Posted by yongjie zhao <yo...@gmail.com>.
I give a suggestion:
When creating a view, you must **mark** each fact table, and then add the
**add** where clause when you aggregate the query.
example:
select sum(measure), dims
from flat_tbl
where flat_tbl.tbl_marker = tb1
group by dims;
On Mon, May 25, 2020 at 2:14 PM my is mine <79...@qq.com> wrote:
> i have already join the two tables,i mean when i use sum,i calcutated the
> duplicated rows,how i avoid this
>
>
> ------------------ 原始邮件 ------------------
> *发件人:* "yongjie zhao"<yo...@gmail.com>;
> *发送时间:* 2020年5月25日(星期一) 下午2:12
> *收件人:* "user"<us...@kylin.apache.org>;
> *主题:* Re: multi fact tables
>
> try creating table view in Hive.
>
> On Mon, May 25, 2020 at 2:00 PM my is mine <79...@qq.com> wrote:
>
>> i join two fact tables with a wide fact tables,but there are duplicated
>> rows in it, it affects the funcation like sum, any suggest, how i sum the
>> column
>>
>