Code samples - 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).

Code samples

The examples in this topic use SDK for Java 2.x as a starting point for writing Athena applications.

Note

For information about programming Athena using other language-specific Amazon SDKs, see the following resources:

For more information about running the Java code examples in this section, see the Amazon Athena Java readme on the Amazon code examples repository on GitHub. For the Java programming reference for Athena, see AthenaClient in the Amazon SDK for Java 2.x.

Note

These samples use constants (for example, ATHENA_SAMPLE_QUERY) for strings, which are defined in an ExampleConstants.java class declaration. Replace these constants with your own strings or defined constants.