You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by Jie Tao <ji...@gameforge.com> on 2016/03/09 17:11:49 UTC

cube build failed if the fact_table is not in default database

Hallo,

my fact table is in another database rather than "default". I use hive 
1.2 and it can not handle commands like hive -e 'select * from 
another_database.table'. My cube build failed at the first step with error:

FAILED: SemanticException 1:567 AS clause has an invalid number of aliases.

I guess the reason is that command "hive" cannot do this (I tried it using hive CLI and the same error).

If I first do "use another_database", there was no error, but kylin uses database "default".

Some workaround approach?


Cheers,

Jie



Re: cube build failed if the fact_table is not in default database

Posted by Jie Tao <ji...@gameforge.com>.
the query is:

hive -e 'select * from rawdata.user_logout limit 10'

where user_logout is a Hive view. Strange is:

hive -e 'select * from rawdata.raw_events limit 10'

works where raw_events is a table. The problem may lie on the view?

I created the view with: create view XXX as select xxxx from table


Thank you,

Jie

Am 10.03.2016 um 02:48 schrieb yu feng:
> FAILED: SemanticException 1:567 AS clause has an invalid number of aliases.
>
> I don't think it is error of hive, you should post you hive command here,
> and let's talk about it.
>
> 2016-03-10 1:07 GMT+08:00 Sarnath <st...@gmail.com>:
>
>> Its hard to believe that select * from db.table does not work... Have used
>> it many times in hive....
>>
>> Are you in a secure envmt? Like sentry, ranger guarding the databases and
>> connected to active directory for authentication?
>>
>> Best,
>> Sarnath
>>


Re: cube build failed if the fact_table is not in default database

Posted by Jie Tao <ji...@gameforge.com>.
more info:

the query select * from database.viewname works with Hue and Beeline 
that use HiveServer2

Jie

Am 10.03.2016 um 02:48 schrieb yu feng:
> FAILED: SemanticException 1:567 AS clause has an invalid number of aliases.
>
> I don't think it is error of hive, you should post you hive command here,
> and let's talk about it.
>
> 2016-03-10 1:07 GMT+08:00 Sarnath <st...@gmail.com>:
>
>> Its hard to believe that select * from db.table does not work... Have used
>> it many times in hive....
>>
>> Are you in a secure envmt? Like sentry, ranger guarding the databases and
>> connected to active directory for authentication?
>>
>> Best,
>> Sarnath
>>


Re: cube build failed if the fact_table is not in default database

Posted by yu feng <ol...@gmail.com>.
FAILED: SemanticException 1:567 AS clause has an invalid number of aliases.

I don't think it is error of hive, you should post you hive command here,
and let's talk about it.

2016-03-10 1:07 GMT+08:00 Sarnath <st...@gmail.com>:

> Its hard to believe that select * from db.table does not work... Have used
> it many times in hive....
>
> Are you in a secure envmt? Like sentry, ranger guarding the databases and
> connected to active directory for authentication?
>
> Best,
> Sarnath
>

Re: cube build failed if the fact_table is not in default database

Posted by Jie Tao <ji...@gameforge.com>.
I found that the problem lies on a Hive UDF. I used this function to 
create the view. I created the function using:

|CREATE FUNCTION json_paths AS 'com.xxxx.JsonPathsUDTF' USING JAR 
'hdfs:///user/admin/hive-jars/xxx-SNAPSHOT.jar'


Now I changed this with database.functionname.

The query works now. I will try cube build again.

Thanks,

Jie


|
Am 09.03.2016 um 18:07 schrieb Sarnath:
> Its hard to believe that select * from db.table does not work... Have used
> it many times in hive....
>
> Are you in a secure envmt? Like sentry, ranger guarding the databases and
> connected to active directory for authentication?
>
> Best,
> Sarnath
>


Re: cube build failed if the fact_table is not in default database

Posted by Sarnath <st...@gmail.com>.
Its hard to believe that select * from db.table does not work... Have used
it many times in hive....

Are you in a secure envmt? Like sentry, ranger guarding the databases and
connected to active directory for authentication?

Best,
Sarnath