A convert date transformation converts an input value that is a date in one format into an output date in a different format. The same can be achieved using a Row Level Code transformation, but this transformation makes it easier to avoid common pitfalls in python date transformation code.
Prerequisites
- You must have Manage Data Mappings permission.
- A syntactic mapping should have already been created.
Creating a Convert Date Transformation
To create a Convert Date transformation, complete the following steps.
Step 1: Open the Transformations Panel
- In the Syntactic Mappings page, choose the mapping you want to edit.
- Click the Edit Pencil in the Transformation field for the entry you would like to edit transformations for.
- The Transformations Panel will appear. Click the Add Transformation button.
- Click the dropdown menu to select the desired transformation type.
- Select the Convert Date transformation
Step 2: Fill in the Transformation Configuration
- Note the Source Input and Target Output. It should reflect what you already chose in the syntactic mapping entry.
- Enter the Input and Output date formats. These should both be in the python arrow library format (see supported tokens). For example, if your input is something like "Dec 31, 2024" and you'd like to transform it to something like "2024-12-31", you could use the input format "MMM D, YYYY" and the output format "YYYY-MM-DD".
- When complete, click the Save button.
Ordering Transformations
When code runs, configured transformations are executed one after another. If you want to change the order of transformation execution for specific syntactic mapping entries, complete the following steps.
- In the Syntactic Mapping page, choose the mapping you want to modify.
- Select the Edit Pencil in the Transformation field for the entry you want to edit. The Transformations Panel will appear.
- Click the transformation's handle (six domino-looking dots), and drag the transformation in the order you want it to run. Do this for each transformation that you want to reorder.
- When done, click Save at the bottom of the page.
Editing a Transformation
To edit a transformation, complete the following steps.
- In the Syntactic Mappings page, select the mapping that you want to edit transformations for.
- Find the mapping entry you want to edit, then click the pencil icon in the Transformation column. The Transformations Panel will appear.
- Edit the transformation as desired.
- When complete, click the Save button.