Description

Join two batch operators.

Parameters

Name Description Type Required? Default Value
joinPredicate joinPredicate String
selectClause Select clause String “*”
type Join type, one of “join”, “leftOuterJoin”, “rightOuterJoin”, “fullOuterJoin” String “join”

Script Example

Code

  1. URL = "https://alink-release.oss-cn-beijing.aliyuncs.com/data-files/iris.csv"
  2. SCHEMA_STR = "sepal_length double, sepal_width double, petal_length double, petal_width double, category string";
  3. data1 = CsvSourceBatchOp().setFilePath(URL).setSchemaStr(SCHEMA_STR)
  4. data2 = CsvSourceBatchOp().setFilePath(URL).setSchemaStr(SCHEMA_STR)
  5. joinOp = JoinBatchOp().setJoinPredicate("a.category=b.category").setSelectClause("a.petal_length")
  6. output = joinOp.linkFrom(data1, data2)