Troubleshoot common issues with SQL queries 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).

Troubleshoot common issues with SQL queries in Amazon IoT Analytics

Use the following information to help troubleshoot issues with your SQL queries in Amazon 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.