Date Wrangles
Date wrangles, with recipe examples, parameters, and behavior.
Date Calculator
Add or Subtract time from a date.
Add or subtract time from a date.
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
input | Name of the dates column. | string | — | Yes |
output | Name of the output column of dates. | string, null | null | No |
| Options | ||||
operation | Date operation. | string; one of:
| "add" | No |
time_unit | Time unit for operation. | string, null; one of:
| null | No |
time_value | Time unit value for operation. | number, null | null | No |
| Conditions | ||||
if | Condition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}. | string | — | No |
where | Filter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'. | string | — | No |
where_params | Values used with where for parameterized criteria. Uses SQLite placeholder syntax such as ? or :name. | array, object | — | No |
Examples
wrangles:
- date_calculator:
input: Date
output: New Date
operation: subtract # Optional default is addition
time_unit: days
time_value: 1
| Date |
|---|
| 2022-12-26 |
| New Date |
|---|
| 2022-12-25 |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 75 |
| Catalog key | date_calculator |
| Recipe key | date_calculator |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | Root-level |
| Documentation group | date |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.main.date_calculator |
| Legacy UUID | 19cfeb4f-02af-4ab2-895c-0ff2bb5cce19 |
Sources