Troubleshoot common issues with SQL queries in AWS IoT Analytics - AWS IoT Analytics

AWS IoT Analytics is no longer available to new customers. Existing customers of AWS IoT Analytics can continue to use the service as normal. Learn more

Troubleshoot common issues with SQL queries in AWS IoT Analytics

Use the following information to help troubleshoot issues with your SQL queries in AWS IoT Analytics.

  • To escape a single quote, precede it with another single quote. Don't confuse this with a double quote.

    Example
    SELECT 'O''Reilly'
  • To escape underscores, use backticks to enclose data store column names that begin with an underscore.

    Example
    SELECT `_myMessageAttribute` FROM myDataStore
  • To escape names with numbers, enclose data store names that include numbers in double quotes.

    Example
    SELECT * FROM "myDataStore123"
  • To escape reserved keywords, enclose reserved keywords in double quotes. For more information, see List of Reserved Keywords in SQL SELECT Statements.