Re: import sql.implicits._

2016-10-15 Thread Jakub Dubovsky
Hey Koert, thanks for explanation. I did not recall that every rdd/df/dataset has a "parent" context/sqlContext. When I think about this it kinda make sense. J. On Fri, Oct 14, 2016 at 11:54 PM, Koert Kuipers wrote: > about the stackoverflow question, do this: > > def validateAndTransform(df:

Re: import sql.implicits._

2016-10-14 Thread Koert Kuipers
about the stackoverflow question, do this: def validateAndTransform(df: DataFrame) : DataFrame = { import df.sparkSession.implicits._ ... } On Fri, Oct 14, 2016 at 5:51 PM, Koert Kuipers wrote: > b > ​asically the implicit conversiosn that need it are rdd => dataset and seq > => dataset

Re: import sql.implicits._

2016-10-14 Thread Koert Kuipers
b ​asically the implicit conversiosn that need it are rdd => dataset and seq => dataset​ On Fri, Oct 14, 2016 at 5:47 PM, Koert Kuipers wrote: > for example when do you Seq(1,2,3).toDF("a") it needs to get the > SparkSession from somewhere. by importing the implicits from > spark.implicits._ the

Re: import sql.implicits._

2016-10-14 Thread Koert Kuipers
for example when do you Seq(1,2,3).toDF("a") it needs to get the SparkSession from somewhere. by importing the implicits from spark.implicits._ they have access to a SparkSession for operations like this. On Fri, Oct 14, 2016 at 4:42 PM, Jakub Dubovsky < spark.dubovsky.ja...@gmail.com> wrote: > H