ok, thank all。I change method!
> 在 2015年12月2日,16:46,Jeff Zhang <zjf...@gmail.com> 写道:
>
> 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 <zjf...@gmail.com
> <mailto:zjf...@gmail.com>> 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, 2015 at 4:33 PM, censj <ce...@lotuseed.com
> <mailto:ce...@lotuseed.com>> wrote:
> 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 <fengdo...@everstring.com
>> <mailto:fengdo...@everstring.com>> 写道:
>>
>> 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 <ce...@lotuseed.com
>>> <mailto:ce...@lotuseed.com>> wrote:
>>>
>>> Dear all,
>>> Can you tell me how did get past SQLContext load function read
>>> multiple tables?
>>
>
>
>
>
> --
> Best Regards
>
> Jeff Zhang
>
>
>
> --
> Best Regards
>
> Jeff Zhang