Re: sparkSQL Load multiple tables

2015-12-02 Thread censj
ok, thank all。I change method! > 在 2015年12月2日,16:46,Jeff Zhang 写道: > > BTW it is also impossible to do split if you want to use sql to load multiple > tables. > > On Wed, Dec 2, 2015 at 4:44 PM, Jeff Zhang > wrote: > Do you want to load multiple tables by using sql ?

Re: sparkSQL Load multiple tables

2015-12-02 Thread Jeff Zhang
BTW it is also impossible to do split if you want to use sql to load multiple tables. On Wed, Dec 2, 2015 at 4:44 PM, Jeff Zhang wrote: > Do you want to load multiple tables by using sql ? JdbcRelation now only > can load single table. It doesn't accept sql as loading command. > > On Wed, Dec 2,

Re: sparkSQL Load multiple tables

2015-12-02 Thread Jeff Zhang
Do you want to load multiple tables by using sql ? JdbcRelation now only can load single table. It doesn't accept sql as loading command. On Wed, Dec 2, 2015 at 4:33 PM, censj wrote: > hi Fengdong Yu: > I want to use sqlContext.read.format('jdbc').options( ... ).load() > but this function o

Re: sparkSQL Load multiple tables

2015-12-02 Thread censj
hi Fengdong Yu: I want to use sqlContext.read.format('jdbc').options( ... ).load() but this function only load a table so i want to know through some operations load multiple tables? > 在 2015年12月2日,16:28,Fengdong Yu 写道: > > It cannot read multiple tables, > > but if your tables have t

Re: sparkSQL Load multiple tables

2015-12-02 Thread Fengdong Yu
It cannot read multiple tables, but if your tables have the same columns, you can read them one by one, then unionAll them, such as: val df1 = sqlContext.table(“table1”) val df2 = sqlContext.table(“table2”) val df = df1.unionAll(df2) > On Dec 2, 2015, at 4:06 PM, censj wrote: > > Dear a

sparkSQL Load multiple tables

2015-12-02 Thread censj
Dear all, Can you tell me how did get past SQLContext load function read multiple tables?