Created
March 21, 2019 03:02
-
-
Save yashwanth2804/cde7a4718ed3f3283ea724250c97f804 to your computer and use it in GitHub Desktop.
This file contains 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
Dataset<Row> ff = spark.read() | |
.option("inferSchema",true) | |
.option("header", "true") | |
.csv("/home/hasura/Desktop/SparkData/emp.csv"); | |
Dataset<Row> ff1 = ff; | |
//ff.join(ff1, ff.col("empid").equalTo(ff1.col("mid"))).show(); | |
ff.as("a") | |
.join(ff.as("b")) | |
.where("a.empid = b.mid") | |
.selectExpr("b.name as employee"," a.name as Employer") | |
.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment