Class: AWS.Athena
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.Athena
- Identifier:
- athena
- API Version:
- 2017-05-18
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service 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 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.
For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
Sending a Request Using Athena
var athena = new AWS.Athena();
athena.batchGetNamedQuery(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the Athena object uses this specific API, you can
construct the object by passing the apiVersion
option to the constructor:
var athena = new AWS.Athena({apiVersion: '2017-05-18'});
You can also set the API version globally in AWS.config.apiVersions
using
the athena service identifier:
AWS.config.apiVersions = {
athena: '2017-05-18',
// other service API versions
};
var athena = new AWS.Athena();
Constructor Summary
-
new AWS.Athena(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary
-
batchGetNamedQuery(params = {}, callback) ⇒ AWS.Request
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.
-
batchGetQueryExecution(params = {}, callback) ⇒ AWS.Request
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.
-
createNamedQuery(params = {}, callback) ⇒ AWS.Request
Creates a named query in the specified workgroup.
-
createWorkGroup(params = {}, callback) ⇒ AWS.Request
Creates a workgroup with the specified name.
-
deleteNamedQuery(params = {}, callback) ⇒ AWS.Request
Deletes the named query if you have access to the workgroup in which the query was saved.
-
deleteWorkGroup(params = {}, callback) ⇒ AWS.Request
Deletes the workgroup with the specified name.
-
getNamedQuery(params = {}, callback) ⇒ AWS.Request
Returns information about a single query.
-
getQueryExecution(params = {}, callback) ⇒ AWS.Request
Returns information about a single execution of a query if you have access to the workgroup in which the query ran.
-
getQueryResults(params = {}, callback) ⇒ AWS.Request
Returns the results of a single query execution specified by QueryExecutionId if you have access to the workgroup in which the query ran.
-
getWorkGroup(params = {}, callback) ⇒ AWS.Request
Returns information about the workgroup with the specified name.
-
listNamedQueries(params = {}, callback) ⇒ AWS.Request
Provides a list of available query IDs only for queries saved in the specified workgroup.
-
listQueryExecutions(params = {}, callback) ⇒ AWS.Request
Provides a list of available query execution IDs for the queries in the specified workgroup.
-
listTagsForResource(params = {}, callback) ⇒ AWS.Request
Lists the tags associated with this workgroup.
-
listWorkGroups(params = {}, callback) ⇒ AWS.Request
Lists available workgroups for the account.
-
startQueryExecution(params = {}, callback) ⇒ AWS.Request
Runs the SQL query statements contained in the Query.
-
stopQueryExecution(params = {}, callback) ⇒ AWS.Request
Stops a query execution.
-
tagResource(params = {}, callback) ⇒ AWS.Request
Adds one or more tags to the resource, such as a workgroup.
-
untagResource(params = {}, callback) ⇒ AWS.Request
Removes one or more tags from the workgroup resource.
-
updateWorkGroup(params = {}, callback) ⇒ AWS.Request
Updates the workgroup with the specified name.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
Property Details
Method Details
batchGetNamedQuery(params = {}, callback) ⇒ AWS.Request
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(params = {}, callback) ⇒ AWS.Request
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.
createNamedQuery(params = {}, callback) ⇒ AWS.Request
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 in the Amazon Athena User Guide.
deleteNamedQuery(params = {}, callback) ⇒ AWS.Request
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 in the Amazon Athena User Guide.
deleteWorkGroup(params = {}, callback) ⇒ AWS.Request
Deletes the workgroup with the specified name. The primary workgroup cannot be deleted.
getNamedQuery(params = {}, callback) ⇒ AWS.Request
Returns information about a single query. Requires that you have access to the workgroup in which the query was saved.
getQueryExecution(params = {}, callback) ⇒ AWS.Request
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(params = {}, callback) ⇒ AWS.Request
Returns the results of a single query execution specified by QueryExecutionId
if you have access to the workgroup in which the query ran. This request does not execute the query but returns results. Use StartQueryExecution to run a query.
getWorkGroup(params = {}, callback) ⇒ AWS.Request
Returns information about the workgroup with the specified name.
listNamedQueries(params = {}, callback) ⇒ AWS.Request
Provides a list of available query IDs only for queries saved 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 in the Amazon Athena User Guide.
listQueryExecutions(params = {}, callback) ⇒ AWS.Request
Provides a list of available query execution IDs for the queries in the specified 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 in the Amazon Athena User Guide.
listTagsForResource(params = {}, callback) ⇒ AWS.Request
Lists the tags associated with this workgroup.
startQueryExecution(params = {}, callback) ⇒ AWS.Request
Runs the SQL query statements contained in the Query
. 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 in the Amazon Athena User Guide.
stopQueryExecution(params = {}, callback) ⇒ AWS.Request
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 in the Amazon Athena User Guide.
tagResource(params = {}, callback) ⇒ AWS.Request
Adds one or more tags to the resource, such as a workgroup. A tag is a label that you assign to an AWS Athena resource (a workgroup). Each tag consists of a key and an optional value, both of which you define. Tags enable you to categorize resources (workgroups) in Athena, for example, by purpose, owner, or environment. Use a consistent set of tag keys to make it easier to search and filter workgroups in your account. For best practices, see AWS Tagging Strategies. The key length is from 1 (minimum) to 128 (maximum) Unicode characters in UTF-8. The tag value length is from 0 (minimum) to 256 (maximum) Unicode characters in UTF-8. You 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, separate them by commas.