DATEADD UDF INTERVAL
Description
This UDF is used to resolve operations with intervals like:
INTERVAL + DATE
INTERVAL + TIMESTAMP
DATE + INTERVAL
DATE + TIMESTAMP
INTERVAL + UNKNOWN
UNKNOWN + INTERVAL
Custom UDF overloads
DATEADD_UDF(string, date)
Parameters
INTERVAL_VALUE: The interval
Stringof the operation.D: The
DATEwhere the interval will be added.
DATEADD_UDF(date, string)
Parameters
D: The
DATEwhere the interval will be added.INTERVAL_VALUE: The interval
Stringof the operation.
DATEADD_UDF(string, timestamp)
Parameters
INTERVAL_VALUE: The interval
Stringof the operation.D: The
TIMESTAMPwhere the interval will be added.
DATEADD_UDF(timestamp, string)
Parameters
D: The
TIMESTAMPwhere the interval will be added.INTERVAL_VALUE: The interval
Stringof the operation.
Usage example
--disableDateAsTimestamp
--disableDateAsTimestampFlag to indicate whether SYSDATE should be transformed into CURRENT_DATE or CURRENT_TIMESTAMP. This will also affect all DATE columns that will be transformed to TIMESTAMP.
Oracle
Snowflake
Known Issues
1. INTERVAL + INTERVAL Operation is not supported
Snowflake does not support INTERVAL + INTERVAL operations.
Related EWIs
SSC-EWI-OR0036: Types resolution issues, the arithmetic operation may not behave correctly between string and date.
Last updated