Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Use magic commands

Focus mode
Use magic commands - Amazon Athena

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.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.