Proprietary functions for JSONata
Full list and description of proprietary HCL Universal Orchestrator functions available for using with JSONata.
In addition to the rich complement of built-in operators and functions provided by JSONata for manipulating and combining extracted data, HCL Universal Orchestrator provides the following proprietary functions.
Name | Description | Example | Example result |
---|---|---|---|
File path management | |||
$file_basename([<path>]) |
Strips directory from file name | $file_basename('/dir1/this_file') |
this_file |
$file_dirname([<path>])
|
Strips last component from file name |
$file_dirname('/dir1/this_file')
|
/dir1
|
$file_towin([<path>])
|
Converts the file path to Windows format |
$file_towin('/dir1/this_file')
|
\dir1\this_file
|
$file_tounix([<path>])
|
Converts the file path to UNIX format |
$file_tounix('\dir1\this_file')
|
/dir1/this_file
|
Date and Time evaluation |
|||
$time_today()
|
Today at current time in ISO-zoned date and time format |
$time_today()
|
|
$time_tomorrow()
|
Tomorrow at current time in ISO zoned date and time format |
$time_tomorrow()
|
|
$time_dow([<dayOfWeek>])
|
The next instance of the context or given day of week, including today, at current time in ISO-zoned date and time format |
$time_dow('mon')
|
|
$time_atNoon([<dateTime>])
|
Change the context or given date and time setting the time to noon |
$time_atNoon('2022-04-01')
|
|
$time_atMidnight([<dateTime>])
|
Change the context or given date and time setting the time to midnight |
$time_atMidnight('2022-04-01')
|
2022-04-01T00:00:00+02:00[Europe/Rome]
|
$time_atNow([<dateTime>])
|
Change the context or given date and time setting the time to current time |
$time_atNow('2022-04-01')
|
2022-04-01T16:30:10.123+02:00[Europe/Rome]
|
$time_atTime([<dateTime>,] <time>)
|
Change the context or given date and time setting the given time |
$time_atTime('2022-04-01T16:30:10.123+02:00[Europe/Rome]','15:46:59.678')
|
2022-04-01T15:46:59.678+02:00[Europe/Rome]
|
$time_parsePic([<dateTime>,] [<pattern>,]
[<locale>])
|
Parse date and time with custom pattern using datecalc command line syntax, the result is in ISO zoned date and time format |
$time_parsePic('2022 04 01
12:21','yyyy^mm^dd^hh:tt')
|
2022-04-01T12:21:00
|
$time_parse([<dateTime>,] [<pattern>,]
[<locale>])
|
Parse date and time with custom pattern using Java DateTimeFormatter syntax, the result is in ISO zoned date and time format |
$time_parse('12:21:00 PM Central European Summer
Time','en-US')
|
12:21:00[Europe/Paris]
|
$time_setZone([<dateTime>,] <zoneId>)
|
Apply the given time zone to the context or given date and time maintaining the local time, the output is in ISO zoned date and time format |
$time_setZone('2022-04-01','Europe/Rome')
|
2022-04-01T00:00:00+02:00[Europe/Rome]
|
$time_atZone([<dateTime>,] <zoneId>)
|
Apply the given time zone to the context or given date and time maintaining the instant, the output is in ISO zoned date and time format |
$time_atZone('2022-04-01T16:30:10.123+02:00[Europe/Rome]','America/New_York')
|
2022-04-01T10:30:10.123-04:00[America/New_York]
|
$time_pic([<dateTime>,] <format>)
|
Format date and time with custom pattern using datecalc command line syntax |
$time_pic('2022-04-01','yyyy-mm-dd/jjj^hh:tt')
|
2022-04-01/092 00:00
|
$time_format([<dateTime>,] <format>)
|
Format date and time with custom pattern using Java DateTimeFormatter syntax |
$time_format('2022-04-01','yyyy-MM-dd/D HH:mm')
|
2022-04-01/92 00:00
|
$time_local([<dateTime>])
|
Format time as ISO local time |
$time_local('2022-04-01T16:30:10.123+02:00[Europe/Rome]')
|
2022-04-01T16:30:10.123
|
$time_localDate([<dateTime>])
|
Format date as ISO local date |
$time_localDate('2022-04-01T16:30:10.123+02:00[Europe/Rome]')
|
2022-04-01
|
$time_localTime([<dateTime>])
|
Format date and time as ISO local time |
$time_localTime('2022-04-01T16:30:10.123+02:00[Europe/Rome]')
|
16:30:10.123
|
$time_zoned([<dateTime>])
|
Format date and time as ISO zoned date and time |
$time_zoned($time_today())
|
2022-04-01T16:30:10.123+02:00[Europe/Rome]
|
$time_offset([<dateTime>])
|
Format date and time as ISO offset date and time |
$time_offset('2022-04-01T16:30:10.123+02:00[Europe/Rome]')
|
2022-04-01T16:30:10.123+02:00
|
$time_instant([<dateTime>])
|
Format date and time as ISO instant |
$time_instant('2022-04-01T16:30:10.123+02:00[Europe/Rome]')
|
2022-04-01T14:30:10.123Z
|
$time_datecalc([<dateTime>,] <offsetExpr>)
|
Applies date expressions to the context or to a given date and time, returns dates and times in ISO time zone format. For more information about the datecalc function, see Manipulating date and time with the datecalc function. |
$time_datecalc('2022-04-01','+ nearest mo +1 day')
|
2022-04-07T00:00:00+02:00[Europe/Rome]
|
Context and external data | |||
$wa_jobprops(<jobStreamName>, <jobName>,
[<schedTime>])
|
Loads the output properties of the specified job |
$wa_jobprops('js1','job1','2022-04-01')
|
{'ia':2022-04-01,'name':'John Paul'}
|
$wa_vartable(<variableTable>)
|
Loads the specified variable table |
|
|
$this()
|
Return the context from the path inside _this field |
$this().wa.name
|
JOB_NAME
|