how to add column in spark scala data rdd code example
Example: how to add a column to a dataframe in scala spark permanent
val df2 = df.select(col("EmpId"),col("Salary"),lit("1").as("lit_value1"))
df2.show()
val df2 = df.select(col("EmpId"),col("Salary"),lit("1").as("lit_value1"))
df2.show()