There is no replace() function. You could use regexp_replace() for this:
SELECT regexp_replace(column_name, ’pattern’, ‘replacement’) FROM table_name
Documentation:
https://spark.apache.org/docs/1.6.1/api/java/org/apache/spark/sql/functions.html#regexp_replace(org.apache.spark.sql.Column,%20java
Hi team,
I am using apache spark 1.6.1
I want to access data from s3 using spark SQL.
For this I need to use MySQL replace function.
DataFrame df=sqlcontext.sql("Select replace(column_name,'ur','xy') from
table_name");
But when I try to run this it is giving error that function Replace is not
d