In Aws Glue after extracting data in DynamicFrame I'm converting date time format to UTC, But if in case date format is wrong for eg Invalid value for date, It will break entire glue flow. So I want to Filter out these bad data from DynamicFrame before processing it further.
I'm using Filter.apply for filtering data and my date is present in "Date": "2022-01-01T12:11:27.251Z" this format.
You can parse the
Datefield to check if it has the expected format. Example:You can include this logic in the implementation of
Filter.apply(). For example, if theDatefield has an invalid format, the row can be filtered out.