This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 => |