RE: What are the alternatives to nested DataFrames?

2018-12-29 Thread email
riday, December 28, 2018 8:48 PM To: em...@yeikel.com <mailto:em...@yeikel.com> Cc: Shahab Yunus mailto:shahab.yu...@gmail.com> >; user mailto:user@spark.apache.org> > Subject: Re: What are the alternatives to nested DataFrames? Could you join() the DFs on a common key? On

Re: What are the alternatives to nested DataFrames?

2018-12-28 Thread Shahab Yunus
t;,"Michigan").toDF()* > > > > *cities.foreach(r => {* > > > > * val city = r.getString(0)* > > > > * val qb = QueryBuilders.matchQuery("name", > city).operator(Operator.AND)* > > * print(qb.toString)* > > > &

RE: What are the alternatives to nested DataFrames?

2018-12-28 Thread email
iginal DF and returns a new dataframe including all the matching terms From: Andrew Melo Sent: Friday, December 28, 2018 8:48 PM To: em...@yeikel.com Cc: Shahab Yunus ; user Subject: Re: What are the alternatives to nested DataFrames? Could you join() the DFs on a common key?

Re: What are the alternatives to nested DataFrames?

2018-12-28 Thread Andrew Melo
tString(0)* > > > > * val qb = QueryBuilders.matchQuery("name", > city).operator(Operator.AND)* > > * print(qb.toString)* > > > > * val dfs = sqlContext.esDF("cities/docs", qb.toString) // null > pointer* > > > > * dfs.show()* > > >

RE: What are the alternatives to nested DataFrames?

2018-12-28 Thread email
uery("name", city).operator(Operator.AND) print(qb.toString) val dfs = sqlContext.esDF("cities/docs", qb.toString) // null pointer dfs.show() }) From: Shahab Yunus Sent: Friday, December 28, 2018 12:34 PM To: em...@yeikel.com Cc: user Sub

Re: What are the alternatives to nested DataFrames?

2018-12-28 Thread Shahab Yunus
Can you have a dataframe with a column which stores json (type string)? Or you can also have a column of array type in which you store all cities matching your query. On Fri, Dec 28, 2018 at 2:48 AM wrote: > Hi community , > > > > As shown in other answers online , Spark does not support the