Use magic commands - Amazon Athena
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 magic commands

Magic commands, or magics, are special commands that you can run in a notebook cell. For example, %env shows the environment variables in a notebook session. Athena supports the magic functions in IPython 6.0.3.

This section shows some key magic commands in Athena for Apache Spark.

  • To see a list of magic commands in Athena, run the command %lsmagic in a notebook cell.

  • For information about using magics to create graphs in Athena notebooks, see Use magics to create data graphs.

  • For information about additional magic commands, see Built-in magic commands in the IPython documentation.

Note

Currently, the %pip command fails when executed. This is a known issue.