(2, "D"),
> (3, "E")
> ).toDF("foo", "bar")
>
> val colList = Seq("foo", "bar")
> df.sort(colList.map(col(_).desc): _*).show
>
> +---+---+
> |foo|bar|
> +---+---+
> | 3| E|
> | 2| D|
> | 1| C|
&g
Hi,
I'm trying to sort multiple columns and column names are dynamic.
df.sort(colList.head, colList.tail: _*)
But I'm not sure how to sort in descending order for all columns, I tried
this but it's for only first column..
df.sort(df.col(colList.head).desc)
How can I pass all column names (or
Hi All,
I am trying to retrieve the spark metrics using Graphite Exporter. It seems
by default it is exposing the Application ID, but as per the our
requirements we need Application Name.
Sample GraphiteExporter data:
block_manager{application="local-1477496809940",executor_id="driver",instance="
Hi Experts,
Please suggest. Thanks in advance.
Thanks,
Sreekanth
From: Sreekanth Jella [mailto:srikanth.je...@gmail.com]
Sent: Sunday, August 14, 2016 11:46 AM
To: 'Hyukjin Kwon' <gurwls...@gmail.com>
Cc: 'user @spark' <user@spark.apache.org>
Subject: Re: Fl
rdinates.clerk) as clerk")
.selectExpr("id", "name", "clerk.cid", "clerk.cname")
.show()
would print the results below as you want:
+---++---+-+
| id|name|cid|cname|
+---++---+-+
| 1| foo| 1| foo|
| 1| foo| 1| foo|
1
foo
Expected output:
id, name, clerk.cid, clerk.cname
1, foo, 2, cname2
1, foo, 3, cname3
Thanks,
Sreekanth Jella