Closed hbashary closed 9 months ago
You are right, that Python example code in DIFF.md was wrong, it should read with_data_type_comparator(...)
.
Please modify your code as follows:
-.withComparator(DiffComparators.epsilon(0.01).asRelative().asInclusive(), DoubleType)
+.with_data_type_comparator(DiffComparators.epsilon(0.01).as_relative().as_inclusive(), DoubleType())
I have fixed the DIFF.md.
Thanks for the quick response. One last question - the map attribute doesn't seem to be supported for python.
options = DiffOptions().with_change_column("changes")\\
.with_data_type_comparator(DiffComparators.map[K,V](false))
Error - AttributeError: type object 'DiffComparators' has no attribute 'map'
Right, the Python API does not support the Map comparator. I haven't yet figured out how to get the key and value types K
and V
from Python to Scala.
Thanks Enrico.
I have found a way to provide the MapDiffComparator
to Python API: #226
That fix allows for DiffComparators.map(Integer(), LongType())
in Python.
This has been released.
Trying to run example in documentation using pyspark but keep getting the following error - AttributeError: 'DiffOptions' object has no attribute 'withComparator' .
Running this in a Glue notebook with Spark version 3.3 and spark-extension_2.12-2.8.0. Same issue when upgrading to spark-extension_2.13-2.11.0. Is this method supported for the python api?
Create 2 dataframes
Run Comparator method
Error - AttributeError: 'DiffOptions' object has no attribute 'withComparator'