Skip to main content
Dependencies:
  • ProphecySparkBasicsPython 0.0.1+
  • ProphecySparkBasicsScala 0.0.1+
Cluster requirements:
  • UC dedicated clusters 14.3+ supported
  • UC standard clusters 14.3+ supported
  • Livy clusters 3.0.1+ supported
The CompareColumns gem lets you compare columns between two DataFrames based on the key id columns defined.

Parameters

Example - Compare columns of two DataFrames

Example code

Below are the steps that are performed to compare two DataFrames in compare column gem:
  • Pivot the DataFrame to get the key column’s, compare column name and value
  • Join the pivoted DataFrames and compare the column value using key column’s
  • Calculate the match and mismatch record counts
Repartition the DataFrames as they will be exploded and joined with each other