You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lens.apache.org by "Gokulakannan M (Engineering - Data Platform)" <go...@flipkart.com> on 2015/02/23 08:58:37 UTC

Querying column with same name in main and referenced dimension

Hi,

Querying column with same name in main and referenced dimension results in
the below error.


*Launching query failed cause:No driver accepted the query, because
Ambiguous column C1, in dimensions main_dimension and reference_dimension*

Lets say main_dimension has columns C1 and C2 where C2 points to
*reference_dimension* column R1(foreign key). If column names C2 and R1 are
same, queries like below cannot be executed.

*query execute cube select C1, C2, reference_dimension.R2 from
main_dimension*
*query execute cube select C1, reference_dimension.R1,
reference_dimension.R2 from main_dimension*

Where R2 is some other column in reference_dimension

-- 
Regards,
Gokul

Re: Querying column with same name in main and referenced dimension

Posted by "Gokulakannan M (Engineering - Data Platform)" <go...@flipkart.com>.
Thanks Amareshwari.

On Mon, Feb 23, 2015 at 1:39 PM, amareshwarisr . <am...@gmail.com>
wrote:

> If columns have same names and you are accessing more than one olap entity
> - cube/dimension in the query, you need to give <cube>.col or
> <dimension>.col to resolve ambiguity in the query.
>
> Thanks
> Amareshwari
>
> On Mon, Feb 23, 2015 at 1:28 PM, Gokulakannan M (Engineering - Data
> Platform) <go...@flipkart.com> wrote:
>
>> Hi,
>>
>> Querying column with same name in main and referenced dimension results
>> in the below error.
>>
>>
>> *Launching query failed cause:No driver accepted the query, because
>> Ambiguous column C1, in dimensions main_dimension and reference_dimension*
>>
>> Lets say main_dimension has columns C1 and C2 where C2 points to
>> *reference_dimension* column R1(foreign key). If column names C2 and R1
>> are same, queries like below cannot be executed.
>>
>> *query execute cube select C1, C2, reference_dimension.R2 from
>> main_dimension*
>> *query execute cube select C1, reference_dimension.R1,
>> reference_dimension.R2 from main_dimension*
>>
>> Where R2 is some other column in reference_dimension
>>
>> --
>> Regards,
>> Gokul
>>
>
>


-- 
Regards,
Gokul

Re: Querying column with same name in main and referenced dimension

Posted by "amareshwarisr ." <am...@gmail.com>.
If columns have same names and you are accessing more than one olap entity
- cube/dimension in the query, you need to give <cube>.col or
<dimension>.col to resolve ambiguity in the query.

Thanks
Amareshwari

On Mon, Feb 23, 2015 at 1:28 PM, Gokulakannan M (Engineering - Data
Platform) <go...@flipkart.com> wrote:

> Hi,
>
> Querying column with same name in main and referenced dimension results in
> the below error.
>
>
> *Launching query failed cause:No driver accepted the query, because
> Ambiguous column C1, in dimensions main_dimension and reference_dimension*
>
> Lets say main_dimension has columns C1 and C2 where C2 points to
> *reference_dimension* column R1(foreign key). If column names C2 and R1
> are same, queries like below cannot be executed.
>
> *query execute cube select C1, C2, reference_dimension.R2 from
> main_dimension*
> *query execute cube select C1, reference_dimension.R1,
> reference_dimension.R2 from main_dimension*
>
> Where R2 is some other column in reference_dimension
>
> --
> Regards,
> Gokul
>