No, you would just have to do another select to pull out the fields you are
interested in.
On Sat, Sep 26, 2015 at 11:11 AM, Jerry Lam wrote:
> Hi Michael,
>
> Thanks for the tip. With dataframe, is it possible to explode some
> selected fields in each purchase_items?
> Since purchase_items is a
Hi Michael,
Thanks for the tip. With dataframe, is it possible to explode some selected
fields in each purchase_items?
Since purchase_items is an array of item and each item has a number of
fields (for example product_id and price), is it possible to just explode
these two fields directly using da
The SQL parser without HiveContext is really simple, which is why I
generally recommend users use HiveContext. However, you can do it with
dataframes:
import org.apache.spark.sql.functions._
table("purchases").select(explode(df("purchase_items")).as("item"))
On Fri, Sep 25, 2015 at 4:21 PM, Je