lens-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tao Yan <t...@linkedin.com>
Subject Re: JoinChain Outer Join Enhancement
Date Mon, 22 Aug 2016 06:36:20 GMT
Got it. Thanks!

On Fri, Aug 19, 2016 at 9:45 PM, amareshwarisr . <amareshwari@gmail.com>
wrote:

> Outer join specification is possible at query level. For the same join
> chain, different users might be interested in different type of joins at
> run time. So, it is not tied to join chain as such.
>
> You can also give join type through lens.cube.query.join.type, at query
> level.
>
> Thanks
>
> On Fri, Aug 19, 2016 at 11:07 PM, Tao Yan <tyan@linkedin.com> wrote:
>
>> Hi Lens Developers,
>>
>> I am running some tests using our production data. When I create a
>> JoinChain between dim_1 and dim_2, I found it always generate 'join', i.e.:
>>
>> ... FROM dim_1 dim1 join dim_2 dim2 on dim1.column_a = dim2.column_b
>>
>> If I want to generate *left outer join*, will I be able to just add a
>> property in the JoinChain definition? For example:
>>
>>             <edge>
>>               <from table="dim_1" column="column_a" *mandatory="true"*/>
>>               <to table="dim_2" column="column_b" />
>>             </edge>
>>
>> Here *mandatory="true" indicates a left outer join, the following
>> indicates a right outer join:*
>>
>>             <edge>
>>               <from table="dim_1" column="column_a"/>
>>               <to table="dim_2" column="column_b" *mandatory="true"*/>
>>             </edge>
>>
>> The source here shows that feature is currently not supported:
>> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.
>> lens/lens-api/2.1.0-beta-incubating/org/apache/lens/
>> api/metastore/XTableReference.java?av=f
>>
>> I found the example outer join queries here:
>> https://github.com/apache/lens/blob/master/lens-examples/
>> src/main/resources/dimension-queries.sql
>>
>> But it looks exactly the same as normal SQL, and does not leverage the
>> JoinChain feature.
>>
>> Thanks,
>> --
>>
>> *Tao Yan*
>> Software Engineer
>> Data Analytics Infrastructure Tools and Services
>>
>>
>>
>> 206.250.5345
>> tyan@linkedin.com
>> https://www.linkedin.com/in/taousc
>>
>
>


-- 

*Tao Yan*
Software Engineer
Data Analytics Infrastructure Tools and Services



206.250.5345
tyan@linkedin.com
https://www.linkedin.com/in/taousc

Mime
View raw message