Use literals in formula expressions - Amazon IoT SiteWise
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Use literals in formula expressions

Amazon IoT SiteWise supports the use of literals in expressions and formulas. Literals are fixed values that represent a specific data type. In Amazon IoT SiteWise, you can define number and string literals in formula expressions. Literals can be used in various contexts, including data transformations, alarm conditions, and visualization calculations.

  • Numbers

    Use numbers and scientific notation to define integers and doubles. You can use E notation to express numbers with scientific notation.

    Examples: 1, 2.0, .9, -23.1, 7.89e3, 3.4E-5

  • Strings

    Use the ' (quote) and " (double quote) characters to define strings. The quote type for the start and end must match. To escape a quote that matches the one that you use to declare a string, include that quote character twice. This is the only escape character in Amazon IoT SiteWise strings.

    Examples: 'active', "inactive", '{"temp": 52}', "{""temp"": ""high""}"