Purpose of this Utility
This functionality applies to migrations from Service Now to a database only.
In Precision Bridge 6.0 and earlier, Service Now Duration values were represented by a string of the following format: <days> <hours>:<mins>:<seconds>. For Archiving projects, where the target table was generated by Precision Bridge, the target column created to store a duration value is of type varchar.
From Precision Bridge 6.1 onwards, Duration values are migrated as timestamps, i.e the the base date (1970-01-01 00:00:00) plus the duration. For Archiving projects, where the target table was generated by Precision Bridge, the target column created to store a duration value is of type date/time or timestamp.
For users upgrading from 6.0 to 6.1+, a Utility has been provided to convert projects created in 6.0 and earlier to ensure that the migrated values for duration fields retain the format <days> <hours>:<mins>:<seconds>, rather than a timestamp value.
Running the Utility
To run the utility, open the Project and select Project->Utility->Convert Duration Mappings from the menu.
The utility will open. as shown below.

To run the utility, simply click 'Run Update'. This will go through all the form mappings in the project looking in each for field mappings that fit the criteria below:
- A simple mapping is defined
- The source field is of type 'Duration'
- The target field is of type 'String'
When a mapping is found that meets these criteria, it will be changed to use an assignment mapping, which uses the function DATETIME_TO_SN_DURATION_STR to convert the Service Now duration value (represented as a timestamp) into a duration string of format<days> <hours>:<mins>:<seconds>
Once complete, the Utility will show the number of field mappings that it updated.
You will need to save the project to make this change permanent.
Note that if you cancel the utility before completion, mappings already converted will NOT be reverted to their previous values.
Related Articles
Auto-Generation of SQL Tables with corresponding table and field mappings
Data Types & Transformation - Service Now Archiving Projects
DATETIME_TO_SN_DURATION_STR Function
Comments
0 comments
Please sign in to leave a comment.