Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

apply backtick to a list of column name spark

apply backtick to a list of column name spark

New Contributor

hi guys

i want to apply a backtit to all column existing in a select request with `id -u` a backtickhow to would be my code in order to select all column in the aggs because all my column 'name include dot

val spark = SparkSession.builder.master("local").appName("my-spark-app").getOrCreate()
val df = spark.read.option("inferSchema", "true").option("header", "true").csv("D:\\ProcessDataSet\\anis_data\\Set _1Mud Pumps_Merged.csv")
val aggs = df.columns.map(c => stddev(c).as(c))
val stddevs = df.select(aggs: _*)// what should i do to aggs to call with a `column_name`
stddevs.show(5,false)