Reserved Keywords in Formulas

In CRM Analytics, Data Prep has reserved keywords that need special handling when manually writing formulas. Use double quotes " when referencing dataset columns that share a name with reserved keywords. To avoid cross-referencing your column names to this list, the best practice is to use double quotes around all column names.

Reserved Keywords in Formulas

Enclose dataset columns that share a name with a reserved keyword in double quotes. For example, if your dataset has a column named Month, you can enter this expression:

case when "Month" = ‘New’ then ‘High’ else ‘Low’
Data Prep Reserved Keywords
  • ABS
  • ADD_MONTHS
  • AND
  • ARRAY
  • ARRAY_JOIN
  • ARRAY_CONTAINS
  • BETWEEN
  • CASE
  • CEIL
  • CHAR_LENGTH
  • COALESCE
  • CONCAT
  • CONTAINS
  • CURRENT_DATE
  • CURRENT_TIMESTAMP
  • DATE_ADD
  • DATEDIFF
  • DATE_FORMAT
  • DATE_SUB
  • DATE_TRUNC
  • DAY
  • DAYOFMONTH
  • DAYOFWEEK
  • DAYOFYEAR
  • DISTINCT
  • ELSE
  • END
  • ENDSWITH
  • EXP
  • FALSE
  • FROM
  • FLOOR
  • FORMAT_NUMBER
  • FROM_UNIXTIME
  • HOUR
  • IN
  • INTERVAL
  • IS
  • ISNTR
  • LAST_DAY
  • LIKE
  • LOG
  • LOWER
  • LTRIM
  • MINUTE
  • MONTH
  • MONTHS_BETWEEN
  • NEXT_DAY
  • NOW
  • NOT
  • NULL
  • NULLIF
  • OR
  • POWER
  • QUARTER
  • REPLACE
  • ROUND
  • RTRIM
  • SECOND
  • SIZE
  • SPLIT
  • SQRT
  • STRING
  • SUBSTR
  • SUBSTRING
  • STARTSWITH
  • THEN
  • TITLE
  • TO
  • TO_DATE
  • TO_TIMESTAMP
  • TO_UNIX_TIMESTAMP
  • TRIM
  • TRUE
  • TRUNC
  • TRUNCNUMBER
  • UPPER
  • WHEN
  • WEEK
  • WEEKOFYEAR
  • YEAR

These additional keywords are reserved in formulas with the Multiple row formula turned on. Use double quotes " when referencing dataset columns that have any of these names.

  • CURRENT
  • DENSE_RANK
  • FIRST_VALUE
  • LAG
  • LAST_VALUE
  • LEAD
  • RANK
  • ROW_NUMBER
  • SUM