C. Records that violate the expectation are dropped from the target dataset and recorded as invalid in the event log.
Explanation:
The defined expectation specifies that if the timestamp is not greater than '2020-01-01', the row will be considered in violation of the constraint.
The ON VIOLATION DROP ROW clause states that rows that violate the constraint will be dropped from the target dataset.
Additionally, the expectation clause will log these violations in the event log, indicating which records did not meet the specified constraint criteria.
This behavior ensures that the rows failing the defined constraint are not included in the target dataset and are logged as invalid in the event log for reference or further investigation, maintaining data integrity within the dataset based on the specified constraints.