DATE_ADD - AWS Glue DataBrew

DATE_ADD

Adds a year, month, or day to the date from a source column or value, and creates a new column containing the results.

Parameters
  • sourceColumn – The name of an existing column.

  • value – A character string to evaluate.

  • units – A unit of measure for adjusting the date. Valid values are MONTHS, YEARS, MILLISECONDS, QUARTERS, HOURS, MICROSECONDS, WEEKS, SECONDS, DAYS, and MINUTES.

  • dateAddValue – The number of units to be added to the date.

  • dateTimeFormat – Optional. A format string for the date, as it is to appear in the new column. If not specified, the default format is yyyy-mm-dd HH:MM:SS.

  • targetColumn – A name for the newly created column.

Note

You can specify either sourceColumn or value, but not both.

Example

{ "RecipeAction": { "Operation": "DATE_ADD", "Parameters": { "sourceColumn": "DATE Column 1", "units": "DAYS", "dateAddValue": "14", "dateTimeFormat": "mm/dd/yyyy", "targetColumn": "DATE Column 1_DATEADD" } } }