spark.read.format("csv").option("header","true").load("in/file.csv");
def p(row: Row) = Row(row.getString(0).toUpperCase,row.getString(1),row.getString(2));
rddData.map(p).foreach(println);
var transform = inFile.map(row=>(row.getString(0),row.getString(1),row.getString(2),"XXXXXXXXXXXXXXXX")).
transform.write.format("csv").option("header","false").save("out/names.csv");
No hay comentarios:
Publicar un comentario