Equivalent ESQL and XPath mapping functions
You can implement some data mapping functions either by using XPath functions or by supplying equivalent ESQL functions in a Custom ESQL transform.
The following functions in the ESQL language have equivalent XPath functions built into the Graphical Data Mapping editor. You can invoke these functions directly without having to write ESQL modules in an ESQL file to be called from the map:
ESQL function | XPath function |
---|---|
EXTRACT YEAR FROM | fn:year-from-date fn:year-from-dateTime |
EXTRACT MONTH FROM | fn:month-from-date fn:month-from-dateTime |
EXTRACT DAY FROM | fn:day-from-date fn:day-from-dateTime |
EXTRACT HOUR FROM | fn:hours-from-dateTime fn:hours-from-duration fn:hours-from-time |
EXTRACT MINUTE FROM | fn:minutes-from-dateTime fn:minutes-from-duration fn:minutes-from-time |
EXTRACT SECOND FROM | fn:seconds-from-dateTime fn:seconds-from-duration fn:seconds-from-time |
EXTRACT DAYS FROM | fn:days-from-duration |
EXTRACT MONTHS FROM | fn:months-from-duration |
CURRENT_DATE | fn:current-date |
CURRENT_TIME | fn:current-time |
CURRENT_TIMESTAMP | fn:current-dateTime |
LOCAL_TIMEZONE | fn:implicit-timezone |
ABS (ABSVAL) | fn:abs |
CEIL (CEILING) | fn:ceiling |
FLOOR | fn:floor |
LEFT | fn:substring |
CONTAINS | fn:contains |
ENDSWITH | fn:ends-with |
LENGTH | fn:string-length |
LOWER (LCASE) | fn:lower-case |
REPLACE | fn:replace |
RIGHT | fn:substring |
STARTSWITH | fn:starts-with |
SUBSTRING ... FROM | fn:substring |
SUBSTRING ... BEFORE | fn:substring-before |
SUBSTRING ... AFTER | fn:substring-after |
SUBSTRING ... FROM ... FOR | fn:substring(fn:substring(...), $for) |
SUBSTRING ... BEFORE ... FOR | fn:substring(fn:substring-before(...), $for) |
SUBSTRING ... AFTER ... FOR | fn:substring(fn:substring-after(...), $for) |
TRANSLATE | fn:translate |
UPPER (UCASE) | fn:upper-case |
FIELDNAME | fn:local-name |
FIELDNAMESPACE | fn:namespace-uri |
CARDINALITY | fn:count |
EXISTS | fn:exists |