Parse as Simple Date directive

The PARSE-AS-SIMPLEDATE directive parses strings with datetime values to the timestamp_micros data type, which is based on the Avro timestamp_micros type.

To convert timestamp_micros to date types, see Converting Timestamp types to Date.

If you are adding a Wrangler transformation to a pipeline with BigQuery sources or sinks and you want to write to a BigQuery datetime column, use PARSE-AS-DATETIME and not PARSE-AS-SIMPLEDATE.


parse-as-simple-date :column 'format'

Usage Notes

The PARSE-AS-SIMPLE-DATE directive will parse a string with datetime values, using a pattern string. If the column is null or has already been parsed as timestamp_micros, applying this directive is a no-op. The column to be parsed as timestamp_micros must be of type string.


See FORMAT-DATE for an explanation and example of these pattern strings.

Created in 2020 by Google Inc.