Supported SQL functionality in Amazon IoT Analytics - Amazon IoT Analytics
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).

Supported SQL functionality in Amazon IoT Analytics

Datasets are generated by using SQL expressions on data in a data store. The queries you run in Amazon IoT Analytics are based on Presto 0.217.

Supported data types

Amazon IoT Analytics and Amazon Athena support these data types.

  • primitive_type

    • TINYINT

    • SMALLINT

    • INT

    • BIGINT

    • BOOLEAN

    • DOUBLE

    • FLOAT

    • STRING

    • TIMESTAMP

    • DECIMAL(precision, scale)

    • DATE

    • CHAR (fixed-length character data with a specified length)

    • VARCHAR (variable-length character data with a specified length)

  • array_type

    • ARRAY<data_type>

  • map_type

    • MAP<primitive_type, data_type>

  • struct_type

    • STRUCT<col_name:data_type[COMMENT col_comment][,...]>

Note

Amazon IoT Analytics and Amazon Athena don't support some data types.

Supported functions

Amazon Athena and Amazon IoT Analytics SQL functionality are based on Presto 0.217. For information about related functions, operators, and expressions, see Functions and Operators and the following specific sections from the Presto documentation.

  • Logical operators

  • Comparison functions and operators

  • Conditional expressions

  • Conversion functions

  • Mathematical functions and operators

  • Bitwise functions

  • Decimal functions and operators

  • String functions and operators

  • Binary functions

  • Date and time functions and operators

  • Regular expression functions

  • JSON functions and operators

  • URL functions

  • Aggregate functions

  • Window functions

  • Color functions

  • Array functions and operators

  • Map functions and operators

  • Lambda expressions and functions

  • Teradata functions

Note

Amazon IoT Analytics and Amazon Athena don't support user-defined functions (UDFs or UDAFs) or stored procedures.