Enum Athena2OutputType

  • All Implemented Interfaces:
    Serializable, Comparable<Athena2OutputType>

    public enum Athena2OutputType
    extends Enum<Athena2OutputType>
    Represents various ways to return query results from Athena. For example, choose between a streaming iterator that will eventually yield all results, a static list of rows and next token, or a pointer to the results in S3.
    • Enum Constant Detail

      • StreamList

        public static final Athena2OutputType StreamList
        When using an endpoint that returns rows directly back to the caller, such as getQueryResults, use AWS 2 Athena GetQueryResultsIterable to return a streaming list of results. Returning a streaming result means that no API requests happen until the streaming result is accessed the first time.

        This is the type to use if you need to process large result sets in memory (as opposed to in another process like an EMR job), as the iterable returned using this method will stream results from AWS a page at a time, thus limiting the amount of memory consumed at any one point in time.

      • SelectList

        public static final Athena2OutputType SelectList
        Return a static list of rows. The amount of rows returned is limited to the max response size of Athena's GetQueryResults (currently 1,000). Will also set the Athena2Constants.NEXT_TOKEN header to allow access to the next page of results.
        See Also:
        GetQueryResults
      • S3Pointer

        public static final Athena2OutputType S3Pointer
        Return the path to the results in S3. This may be preferred if you want to pass a pointer to the results to another process for handling.
    • Method Detail

      • values

        public static Athena2OutputType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Athena2OutputType c : Athena2OutputType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Athena2OutputType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null