spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mich Talebzadeh <mich.talebza...@gmail.com>
Subject Re: How to convert from DataFrame to Dataset[Row]?
Date Fri, 15 Jul 2016 19:29:44 GMT
can't you create a temp table from DF say df.registerTempTable("tmp") and
use that instead?



Dr Mich Talebzadeh



LinkedIn * https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
<https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*



http://talebzadehmich.wordpress.com


*Disclaimer:* Use it at your own risk. Any and all responsibility for any
loss, damage or destruction of data or any other property which may arise
from relying on this email's technical content is explicitly disclaimed.
The author will in no case be liable for any monetary damages arising from
such loss, damage or destruction.



On 15 July 2016 at 20:21, Daniel Barclay <danielbarclay.oss@gmail.com>
wrote:

> In Spark 1.6.1, how can I convert a DataFrame to a Dataset[Row]?
>
> Is there a direct conversion?  (Trying <someDataframe>.as[Row] doesn't
> work,
> even after importing  <my sqlContext>.implicits._ .)
>
> Is there some way to map the Rows from the Dataframe into the Dataset[Row]?
> (DataFrame.map would just make another Dataframe, right?)
>
>
> Thanks,
> Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe e-mail: user-unsubscribe@spark.apache.org
>
>

Mime
View raw message