NAME

Paws::Athena - Perl Interface to AWS Amazon Athena

SYNOPSIS

use Paws;

my $obj = Paws->service('Athena');
my $res = $obj->Method(
  Arg1 => $val1,
  Arg2 => [ 'V1', 'V2' ],
  # if Arg3 is an object, the HashRef will be used as arguments to the constructor
  # of the arguments type
  Arg3 => { Att1 => 'Val1' },
  # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
  # the constructor of the arguments type
  Arg4 => [ { Att1 => 'Val1'  }, { Att1 => 'Val2' } ],
);

DESCRIPTION

Amazon Athena is an interactive query service that lets you use standard SQL to analyze data directly in Amazon S3. You can point Athena at your data in Amazon S3 and run ad-hoc queries and get results in seconds. Athena is serverless, so there is no infrastructure to set up or manage. You pay only for the queries you run. Athena scales automatically—executing queries in parallel—so results are fast, even with large datasets and complex queries. For more information, see What is Amazon Athena (http://docs.aws.amazon.com/athena/latest/ug/what-is.html) in the Amazon Athena User Guide.

If you connect to Athena using the JDBC driver, use version 1.1.0 of the driver or later with the Amazon Athena API. Earlier version drivers do not support the API. For more information and to download the driver, see Accessing Amazon Athena with JDBC (https://docs.aws.amazon.com/athena/latest/ug/connect-with-jdbc.html).

For code samples using the AWS SDK for Java, see Examples and Code Samples (https://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon Athena User Guide.

For the AWS API documentation, see https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18

METHODS

BatchGetNamedQuery

NamedQueryIds => ArrayRef[Str|Undef]

Each argument is described in detail in: Paws::Athena::BatchGetNamedQuery

Returns: a Paws::Athena::BatchGetNamedQueryOutput instance

Returns the details of a single named query or a list of up to 50 queries, which you provide as an array of query ID strings. Requires you to have access to the workgroup in which the queries were saved. Use ListNamedQueriesInput to get the list of named query IDs in the specified workgroup. If information could not be retrieved for a submitted query ID, information about the query ID submitted is listed under UnprocessedNamedQueryId. Named queries differ from executed queries. Use BatchGetQueryExecutionInput to get details about each unique query execution, and ListQueryExecutionsInput to get a list of query execution IDs.

BatchGetQueryExecution

QueryExecutionIds => ArrayRef[Str|Undef]

Each argument is described in detail in: Paws::Athena::BatchGetQueryExecution

Returns: a Paws::Athena::BatchGetQueryExecutionOutput instance

Returns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings. Requires you to have access to the workgroup in which the queries ran. To get a list of query execution IDs, use ListQueryExecutionsInput$WorkGroup. Query executions differ from named (saved) queries. Use BatchGetNamedQueryInput to get details about named queries.

CreateDataCatalog

Name => Str
Type => Str
[Description => Str]
[Parameters => Paws::Athena::ParametersMap]
[Tags => ArrayRef[Paws::Athena::Tag]]

Each argument is described in detail in: Paws::Athena::CreateDataCatalog

Returns: a Paws::Athena::CreateDataCatalogOutput instance

Creates (registers) a data catalog with the specified name and properties. Catalogs created are visible to all users of the same AWS account.

CreateNamedQuery

Database => Str
Name => Str
QueryString => Str
[ClientRequestToken => Str]
[Description => Str]
[WorkGroup => Str]

Each argument is described in detail in: Paws::Athena::CreateNamedQuery

Returns: a Paws::Athena::CreateNamedQueryOutput instance

Creates a named query in the specified workgroup. Requires that you have access to the workgroup.

For code samples using the AWS SDK for Java, see Examples and Code Samples (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon Athena User Guide.

CreatePreparedStatement

QueryStatement => Str
StatementName => Str
WorkGroup => Str
[Description => Str]

Each argument is described in detail in: Paws::Athena::CreatePreparedStatement

Returns: a Paws::Athena::CreatePreparedStatementOutput instance

Creates a prepared statement for use with SQL queries in Athena.

CreateWorkGroup

Name => Str
[Configuration => Paws::Athena::WorkGroupConfiguration]
[Description => Str]
[Tags => ArrayRef[Paws::Athena::Tag]]

Each argument is described in detail in: Paws::Athena::CreateWorkGroup

Returns: a Paws::Athena::CreateWorkGroupOutput instance

Creates a workgroup with the specified name.

DeleteDataCatalog

Name => Str

Each argument is described in detail in: Paws::Athena::DeleteDataCatalog

Returns: a Paws::Athena::DeleteDataCatalogOutput instance

Deletes a data catalog.

DeleteNamedQuery

NamedQueryId => Str

Each argument is described in detail in: Paws::Athena::DeleteNamedQuery

Returns: a Paws::Athena::DeleteNamedQueryOutput instance

Deletes the named query if you have access to the workgroup in which the query was saved.

For code samples using the AWS SDK for Java, see Examples and Code Samples (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon Athena User Guide.

DeletePreparedStatement

StatementName => Str
WorkGroup => Str

Each argument is described in detail in: Paws::Athena::DeletePreparedStatement

Returns: a Paws::Athena::DeletePreparedStatementOutput instance

Deletes the prepared statement with the specified name from the specified workgroup.

DeleteWorkGroup

WorkGroup => Str
[RecursiveDeleteOption => Bool]

Each argument is described in detail in: Paws::Athena::DeleteWorkGroup

Returns: a Paws::Athena::DeleteWorkGroupOutput instance

Deletes the workgroup with the specified name. The primary workgroup cannot be deleted.

GetDatabase

CatalogName => Str
DatabaseName => Str

Each argument is described in detail in: Paws::Athena::GetDatabase

Returns: a Paws::Athena::GetDatabaseOutput instance

Returns a database object for the specified database and data catalog.

GetDataCatalog

Name => Str

Each argument is described in detail in: Paws::Athena::GetDataCatalog

Returns: a Paws::Athena::GetDataCatalogOutput instance

Returns the specified data catalog.

GetNamedQuery

NamedQueryId => Str

Each argument is described in detail in: Paws::Athena::GetNamedQuery

Returns: a Paws::Athena::GetNamedQueryOutput instance

Returns information about a single query. Requires that you have access to the workgroup in which the query was saved.

GetPreparedStatement

StatementName => Str
WorkGroup => Str

Each argument is described in detail in: Paws::Athena::GetPreparedStatement

Returns: a Paws::Athena::GetPreparedStatementOutput instance

Retrieves the prepared statement with the specified name from the specified workgroup.

GetQueryExecution

QueryExecutionId => Str

Each argument is described in detail in: Paws::Athena::GetQueryExecution

Returns: a Paws::Athena::GetQueryExecutionOutput instance

Returns information about a single execution of a query if you have access to the workgroup in which the query ran. Each time a query executes, information about the query execution is saved with a unique ID.

GetQueryResults

QueryExecutionId => Str
[MaxResults => Int]
[NextToken => Str]

Each argument is described in detail in: Paws::Athena::GetQueryResults

Returns: a Paws::Athena::GetQueryResultsOutput instance

Streams the results of a single query execution specified by QueryExecutionId from the Athena query results location in Amazon S3. For more information, see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html) in the Amazon Athena User Guide. This request does not execute the query but returns results. Use StartQueryExecution to run a query.

To stream query results successfully, the IAM principal with permission to call GetQueryResults also must have permissions to the Amazon S3 GetObject action for the Athena query results location.

IAM principals with permission to the Amazon S3 GetObject action for the query results location are able to retrieve query results from Amazon S3 even if permission to the GetQueryResults action is denied. To restrict user or role access, ensure that Amazon S3 permissions to the Athena query location are denied.

GetTableMetadata

CatalogName => Str
DatabaseName => Str
TableName => Str

Each argument is described in detail in: Paws::Athena::GetTableMetadata

Returns: a Paws::Athena::GetTableMetadataOutput instance

Returns table metadata for the specified catalog, database, and table.

GetWorkGroup

WorkGroup => Str

Each argument is described in detail in: Paws::Athena::GetWorkGroup

Returns: a Paws::Athena::GetWorkGroupOutput instance

Returns information about the workgroup with the specified name.

ListDatabases

CatalogName => Str
[MaxResults => Int]
[NextToken => Str]

Each argument is described in detail in: Paws::Athena::ListDatabases

Returns: a Paws::Athena::ListDatabasesOutput instance

Lists the databases in the specified data catalog.

ListDataCatalogs

[MaxResults => Int]
[NextToken => Str]

Each argument is described in detail in: Paws::Athena::ListDataCatalogs

Returns: a Paws::Athena::ListDataCatalogsOutput instance

Lists the data catalogs in the current AWS account.

ListEngineVersions

[MaxResults => Int]
[NextToken => Str]

Each argument is described in detail in: Paws::Athena::ListEngineVersions

Returns: a Paws::Athena::ListEngineVersionsOutput instance

Returns a list of engine versions that are available to choose from, including the Auto option.

ListNamedQueries

[MaxResults => Int]
[NextToken => Str]
[WorkGroup => Str]

Each argument is described in detail in: Paws::Athena::ListNamedQueries

Returns: a Paws::Athena::ListNamedQueriesOutput instance

Provides a list of available query IDs only for queries saved in the specified workgroup. Requires that you have access to the specified workgroup. If a workgroup is not specified, lists the saved queries for the primary workgroup.

For code samples using the AWS SDK for Java, see Examples and Code Samples (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon Athena User Guide.

ListPreparedStatements

WorkGroup => Str
[MaxResults => Int]
[NextToken => Str]

Each argument is described in detail in: Paws::Athena::ListPreparedStatements

Returns: a Paws::Athena::ListPreparedStatementsOutput instance

Lists the prepared statements in the specfied workgroup.

ListQueryExecutions

[MaxResults => Int]
[NextToken => Str]
[WorkGroup => Str]

Each argument is described in detail in: Paws::Athena::ListQueryExecutions

Returns: a Paws::Athena::ListQueryExecutionsOutput instance

Provides a list of available query execution IDs for the queries in the specified workgroup. If a workgroup is not specified, returns a list of query execution IDs for the primary workgroup. Requires you to have access to the workgroup in which the queries ran.

For code samples using the AWS SDK for Java, see Examples and Code Samples (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon Athena User Guide.

ListTableMetadata

CatalogName => Str
DatabaseName => Str
[Expression => Str]
[MaxResults => Int]
[NextToken => Str]

Each argument is described in detail in: Paws::Athena::ListTableMetadata

Returns: a Paws::Athena::ListTableMetadataOutput instance

Lists the metadata for the tables in the specified data catalog database.

ListTagsForResource

ResourceARN => Str
[MaxResults => Int]
[NextToken => Str]

Each argument is described in detail in: Paws::Athena::ListTagsForResource

Returns: a Paws::Athena::ListTagsForResourceOutput instance

Lists the tags associated with an Athena workgroup or data catalog resource.

ListWorkGroups

[MaxResults => Int]
[NextToken => Str]

Each argument is described in detail in: Paws::Athena::ListWorkGroups

Returns: a Paws::Athena::ListWorkGroupsOutput instance

Lists available workgroups for the account.

StartQueryExecution

QueryString => Str
[ClientRequestToken => Str]
[QueryExecutionContext => Paws::Athena::QueryExecutionContext]
[ResultConfiguration => Paws::Athena::ResultConfiguration]
[WorkGroup => Str]

Each argument is described in detail in: Paws::Athena::StartQueryExecution

Returns: a Paws::Athena::StartQueryExecutionOutput instance

Runs the SQL query statements contained in the Query. Requires you to have access to the workgroup in which the query ran. Running queries against an external catalog requires GetDataCatalog permission to the catalog. For code samples using the AWS SDK for Java, see Examples and Code Samples (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon Athena User Guide.

StopQueryExecution

QueryExecutionId => Str

Each argument is described in detail in: Paws::Athena::StopQueryExecution

Returns: a Paws::Athena::StopQueryExecutionOutput instance

Stops a query execution. Requires you to have access to the workgroup in which the query ran.

For code samples using the AWS SDK for Java, see Examples and Code Samples (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon Athena User Guide.

TagResource

ResourceARN => Str
Tags => ArrayRef[Paws::Athena::Tag]

Each argument is described in detail in: Paws::Athena::TagResource

Returns: a Paws::Athena::TagResourceOutput instance

Adds one or more tags to an Athena resource. A tag is a label that you assign to a resource. In Athena, a resource can be a workgroup or data catalog. Each tag consists of a key and an optional value, both of which you define. For example, you can use tags to categorize Athena workgroups or data catalogs by purpose, owner, or environment. Use a consistent set of tag keys to make it easier to search and filter workgroups or data catalogs in your account. For best practices, see Tagging Best Practices (https://aws.amazon.com/answers/account-management/aws-tagging-strategies/). Tag keys can be from 1 to 128 UTF-8 Unicode characters, and tag values can be from 0 to 256 UTF-8 Unicode characters. Tags can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys and values are case-sensitive. Tag keys must be unique per resource. If you specify more than one tag, separate them by commas.

UntagResource

ResourceARN => Str
TagKeys => ArrayRef[Str|Undef]

Each argument is described in detail in: Paws::Athena::UntagResource

Returns: a Paws::Athena::UntagResourceOutput instance

Removes one or more tags from a data catalog or workgroup resource.

UpdateDataCatalog

Name => Str
Type => Str
[Description => Str]
[Parameters => Paws::Athena::ParametersMap]

Each argument is described in detail in: Paws::Athena::UpdateDataCatalog

Returns: a Paws::Athena::UpdateDataCatalogOutput instance

Updates the data catalog that has the specified name.

UpdatePreparedStatement

QueryStatement => Str
StatementName => Str
WorkGroup => Str
[Description => Str]

Each argument is described in detail in: Paws::Athena::UpdatePreparedStatement

Returns: a Paws::Athena::UpdatePreparedStatementOutput instance

Updates a prepared statement.

UpdateWorkGroup

WorkGroup => Str
[ConfigurationUpdates => Paws::Athena::WorkGroupConfigurationUpdates]
[Description => Str]
[State => Str]

Each argument is described in detail in: Paws::Athena::UpdateWorkGroup

Returns: a Paws::Athena::UpdateWorkGroupOutput instance

Updates the workgroup with the specified name. The workgroup's name cannot be changed.

PAGINATORS

Paginator methods are helpers that repetively call methods that return partial results

GetAllQueryResults(sub { },QueryExecutionId => Str, [MaxResults => Int, NextToken => Str])

GetAllQueryResults(QueryExecutionId => Str, [MaxResults => Int, NextToken => Str])

If passed a sub as first parameter, it will call the sub for each element found in :

- ResultSet.Rows, passing the object as the first parameter, and the string 'ResultSet.Rows' as the second parameter 

If not, it will return a a Paws::Athena::GetQueryResultsOutput instance with all the params; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.

ListAllDatabases(sub { },CatalogName => Str, [MaxResults => Int, NextToken => Str])

ListAllDatabases(CatalogName => Str, [MaxResults => Int, NextToken => Str])

If passed a sub as first parameter, it will call the sub for each element found in :

- DatabaseList, passing the object as the first parameter, and the string 'DatabaseList' as the second parameter 

If not, it will return a a Paws::Athena::ListDatabasesOutput instance with all the params; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.

ListAllDataCatalogs(sub { },[MaxResults => Int, NextToken => Str])

ListAllDataCatalogs([MaxResults => Int, NextToken => Str])

If passed a sub as first parameter, it will call the sub for each element found in :

- DataCatalogsSummary, passing the object as the first parameter, and the string 'DataCatalogsSummary' as the second parameter 

If not, it will return a a Paws::Athena::ListDataCatalogsOutput instance with all the params; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.

ListAllNamedQueries(sub { },[MaxResults => Int, NextToken => Str, WorkGroup => Str])

ListAllNamedQueries([MaxResults => Int, NextToken => Str, WorkGroup => Str])

If passed a sub as first parameter, it will call the sub for each element found in :

- NamedQueryIds, passing the object as the first parameter, and the string 'NamedQueryIds' as the second parameter 

If not, it will return a a Paws::Athena::ListNamedQueriesOutput instance with all the params; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.

ListAllQueryExecutions(sub { },[MaxResults => Int, NextToken => Str, WorkGroup => Str])

ListAllQueryExecutions([MaxResults => Int, NextToken => Str, WorkGroup => Str])

If passed a sub as first parameter, it will call the sub for each element found in :

- QueryExecutionIds, passing the object as the first parameter, and the string 'QueryExecutionIds' as the second parameter 

If not, it will return a a Paws::Athena::ListQueryExecutionsOutput instance with all the params; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.

ListAllTableMetadata(sub { },CatalogName => Str, DatabaseName => Str, [Expression => Str, MaxResults => Int, NextToken => Str])

ListAllTableMetadata(CatalogName => Str, DatabaseName => Str, [Expression => Str, MaxResults => Int, NextToken => Str])

If passed a sub as first parameter, it will call the sub for each element found in :

- TableMetadataList, passing the object as the first parameter, and the string 'TableMetadataList' as the second parameter 

If not, it will return a a Paws::Athena::ListTableMetadataOutput instance with all the params; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.

ListAllTagsForResource(sub { },ResourceARN => Str, [MaxResults => Int, NextToken => Str])

ListAllTagsForResource(ResourceARN => Str, [MaxResults => Int, NextToken => Str])

If passed a sub as first parameter, it will call the sub for each element found in :

- Tags, passing the object as the first parameter, and the string 'Tags' as the second parameter 

If not, it will return a a Paws::Athena::ListTagsForResourceOutput instance with all the params; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.

SEE ALSO

This service class forms part of Paws

BUGS and CONTRIBUTIONS

The source code is located here: https://github.com/pplu/aws-sdk-perl

Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues