EXAMPLE - Comparison Functions Equal

This example demonstrate the EQUAL and NOTEQUAL comparison functions.

In this example, the dataset contains current measurements of the sides of rectangular areas next to the size of those areas as previously reported. Using these functions, you can perform some light analysis of the data.

Source:

sideAsideBreportedArea
41456
6635
8432
1515200
4728
12670
9981

Transform:

In the first test, you are determining if the four-sided area is a square, based on a comparison of the measured values for sideA and sideB:

derive value:EQUAL(sideA, sideB) as:'isSquare'

Next, you can use the reported sides to calculate the area of the shape and compare it to the area previously reported:

derive value:NOTEQUAL(sideA * sideB, reportedArea) as:'isValidData'

Results:

sideAsideBreportedAreaisSquareisValidData
41456FALSEFALSE
6635TRUETRUE
8432FALSEFALSE
1515200TRUETRUE
4728FALSEFALSE
12670FALSETRUE
9981TRUEFALSE
Was this page helpful? Let us know how we did:

Send feedback about...

Google Cloud Dataprep Documentation