Expect the difference of 2 datetime columns is equal to another column in month.
expect_multicolumn_datetime_difference_in_months
This expectation level is BETA
Contributors:
Tags:
Metrics:
Description
Expect the difference of 2 datetime columns is equal to another column in month.
This means that for each row, we expect end_datetime - start_datetime = gap (in months)
Args:
start_datetime (datetime): The first datetime column to compare.
end_datetime (datetime): The second datetime column to compare.
gap (int): The number of months that the difference between start_datetime and end_datetime should be.
Want to make your own Expectation or an improvement to this one?
We've put together some great how to guides (including videos) on how to create your own expectations in a flash!
You can see those resources here: Contributor Resources