RE: Does Spark SQL (JDBC) support nest select with current version

2015-05-14 Thread Cheng, Hao
(JDBC) support nest select with current version @Hao, Because the querying joined more than one table, if I register data frame as temp table, Spark can't disguise which table is correct. I don't how to set dbtable and register temp table. Any suggestion? On Friday, May 15, 2015 1:38

Re: Does Spark SQL (JDBC) support nest select with current version

2015-05-14 Thread Yi Zhang
ueries on it? Do you mean that also failed?   From: Yi Zhang [mailto:zhangy...@yahoo.com.INVALID] Sent: Friday, May 15, 2015 1:10 PM To: Yi Zhang; Dev Subject: Re: Does Spark SQL (JDBC) support nest select with current version   If I pass the whole statement as dbtable to sqlContext.load() method

RE: Does Spark SQL (JDBC) support nest select with current version

2015-05-14 Thread Cheng, Hao
You need to register the “dataFrame” as a table first and then do queries on it? Do you mean that also failed? From: Yi Zhang [mailto:zhangy...@yahoo.com.INVALID] Sent: Friday, May 15, 2015 1:10 PM To: Yi Zhang; Dev Subject: Re: Does Spark SQL (JDBC) support nest select with current version If

Re: Does Spark SQL (JDBC) support nest select with current version

2015-05-14 Thread Yi Zhang
If I pass the whole statement as dbtable to sqlContext.load() method as below:val query = """ (select t1._salory as salory, |t1._name as employeeName, |(select _name from mock_locations t3 where t3._id = t1._location_id ) as locationName |from mock_employees t1 |inner join m

Does Spark SQL (JDBC) support nest select with current version

2015-05-14 Thread Yi Zhang
The sql statement is like this:select t1._salory as salory, t1._name as employeeName, (select _name from mock_locations t3 where t3._id = t1._location_id ) as locationName from mock_employees t1 inner join mock_locations t2 on t1._location_id = t2._id where t1._salory > t2._max_price I noticed th