Skip to content

Instantly share code, notes, and snippets.

View rajeshsantha's full-sized avatar
🎯
Focusing

Rajesh Santha rajeshsantha

🎯
Focusing
View GitHub Profile
// save customers into all the file formats and their respective compressions under /user/rajeshs/fileformats_customers
val customersRDD = sc.textFile("/user/rajeshs/sqoop_import_all/retail_db/customers")
val customersDF = customersRDD.map(y=> {
val x= y.split(",")
(x(0),x(1),x(2),x(3),x(4),x(5),x(6),x(7),x(8)) }).toDF("customer_id","customer_fname","customer_lname","customer_email","customer_password","customer_street","customer_city","customer_state","customer_zipcode")
customersDF.registerTempTable("customers")
/*
1)text =>