AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Implementation for accessing Athena 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 Amazon Web Services SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
Namespace: Amazon.Athena
Assembly: AWSSDK.Athena.dll
Version: 3.x.y.z
public class AmazonAthenaClient : AmazonServiceClient IAmazonAthena, IAmazonService, IDisposable
The AmazonAthenaClient type exposes the following members
Name | Description | |
---|---|---|
![]() |
AmazonAthenaClient() |
Constructs AmazonAthenaClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
![]() |
AmazonAthenaClient(RegionEndpoint) |
Constructs AmazonAthenaClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
![]() |
AmazonAthenaClient(AmazonAthenaConfig) |
Constructs AmazonAthenaClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
![]() |
AmazonAthenaClient(AWSCredentials) |
Constructs AmazonAthenaClient with AWS Credentials |
![]() |
AmazonAthenaClient(AWSCredentials, RegionEndpoint) |
Constructs AmazonAthenaClient with AWS Credentials |
![]() |
AmazonAthenaClient(AWSCredentials, AmazonAthenaConfig) |
Constructs AmazonAthenaClient with AWS Credentials and an AmazonAthenaClient Configuration object. |
![]() |
AmazonAthenaClient(string, string) |
Constructs AmazonAthenaClient with AWS Access Key ID and AWS Secret Key |
![]() |
AmazonAthenaClient(string, string, RegionEndpoint) |
Constructs AmazonAthenaClient with AWS Access Key ID and AWS Secret Key |
![]() |
AmazonAthenaClient(string, string, AmazonAthenaConfig) |
Constructs AmazonAthenaClient with AWS Access Key ID, AWS Secret Key and an AmazonAthenaClient Configuration object. |
![]() |
AmazonAthenaClient(string, string, string) |
Constructs AmazonAthenaClient with AWS Access Key ID and AWS Secret Key |
![]() |
AmazonAthenaClient(string, string, string, RegionEndpoint) |
Constructs AmazonAthenaClient with AWS Access Key ID and AWS Secret Key |
![]() |
AmazonAthenaClient(string, string, string, AmazonAthenaConfig) |
Constructs AmazonAthenaClient with AWS Access Key ID, AWS Secret Key and an AmazonAthenaClient Configuration object. |
Name | Type | Description | |
---|---|---|---|
![]() |
Config | Amazon.Runtime.IClientConfig | Inherited from Amazon.Runtime.AmazonServiceClient. |
![]() |
Paginators | Amazon.Athena.Model.IAthenaPaginatorFactory |
Paginators for the service |
Name | Description | |
---|---|---|
![]() |
BatchGetNamedQuery(BatchGetNamedQueryRequest) |
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. |
![]() |
BatchGetNamedQueryAsync(BatchGetNamedQueryRequest, CancellationToken) |
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(BatchGetQueryExecutionRequest) |
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. |
![]() |
BatchGetQueryExecutionAsync(BatchGetQueryExecutionRequest, CancellationToken) |
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(CreateDataCatalogRequest) |
Creates (registers) a data catalog with the specified name and properties. Catalogs created are visible to all users of the same Amazon Web Services account. |
![]() |
CreateDataCatalogAsync(CreateDataCatalogRequest, CancellationToken) |
Creates (registers) a data catalog with the specified name and properties. Catalogs created are visible to all users of the same Amazon Web Services account. |
![]() |
CreateNamedQuery(CreateNamedQueryRequest) |
Creates a named query in the specified workgroup. Requires that you have access to the workgroup. For code samples using the Amazon Web Services SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide. |
![]() |
CreateNamedQueryAsync(CreateNamedQueryRequest, CancellationToken) |
Creates a named query in the specified workgroup. Requires that you have access to the workgroup. For code samples using the Amazon Web Services SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide. |
![]() |
CreatePreparedStatement(CreatePreparedStatementRequest) |
Creates a prepared statement for use with SQL queries in Athena. |
![]() |
CreatePreparedStatementAsync(CreatePreparedStatementRequest, CancellationToken) |
Creates a prepared statement for use with SQL queries in Athena. |
![]() |
CreateWorkGroup(CreateWorkGroupRequest) |
Creates a workgroup with the specified name. |
![]() |
CreateWorkGroupAsync(CreateWorkGroupRequest, CancellationToken) |
Creates a workgroup with the specified name. |
![]() |
DeleteDataCatalog(DeleteDataCatalogRequest) |
Deletes a data catalog. |
![]() |
DeleteDataCatalogAsync(DeleteDataCatalogRequest, CancellationToken) |
Deletes a data catalog. |
![]() |
DeleteNamedQuery(DeleteNamedQueryRequest) |
Deletes the named query if you have access to the workgroup in which the query was saved. For code samples using the Amazon Web Services SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide. |
![]() |
DeleteNamedQueryAsync(DeleteNamedQueryRequest, CancellationToken) |
Deletes the named query if you have access to the workgroup in which the query was saved. For code samples using the Amazon Web Services SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide. |
![]() |
DeletePreparedStatement(DeletePreparedStatementRequest) |
Deletes the prepared statement with the specified name from the specified workgroup. |
![]() |
DeletePreparedStatementAsync(DeletePreparedStatementRequest, CancellationToken) |
Deletes the prepared statement with the specified name from the specified workgroup. |
![]() |
DeleteWorkGroup(DeleteWorkGroupRequest) |
Deletes the workgroup with the specified name. The primary workgroup cannot be deleted. |
![]() |
DeleteWorkGroupAsync(DeleteWorkGroupRequest, CancellationToken) |
Deletes the workgroup with the specified name. The primary workgroup cannot be deleted. |
![]() |
Dispose() | Inherited from Amazon.Runtime.AmazonServiceClient. |
![]() |
GetDatabase(GetDatabaseRequest) |
Returns a database object for the specified database and data catalog. |
![]() |
GetDatabaseAsync(GetDatabaseRequest, CancellationToken) |
Returns a database object for the specified database and data catalog. |
![]() |
GetDataCatalog(GetDataCatalogRequest) |
Returns the specified data catalog. |
![]() |
GetDataCatalogAsync(GetDataCatalogRequest, CancellationToken) |
Returns the specified data catalog. |
![]() |
GetNamedQuery(GetNamedQueryRequest) |
Returns information about a single query. Requires that you have access to the workgroup in which the query was saved. |
![]() |
GetNamedQueryAsync(GetNamedQueryRequest, CancellationToken) |
Returns information about a single query. Requires that you have access to the workgroup in which the query was saved. |
![]() |
GetPreparedStatement(GetPreparedStatementRequest) |
Retrieves the prepared statement with the specified name from the specified workgroup. |
![]() |
GetPreparedStatementAsync(GetPreparedStatementRequest, CancellationToken) |
Retrieves the prepared statement with the specified name from the specified workgroup. |
![]() |
GetQueryExecution(GetQueryExecutionRequest) |
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. |
![]() |
GetQueryExecutionAsync(GetQueryExecutionRequest, CancellationToken) |
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(GetQueryResultsRequest) |
Streams the results of a single query execution specified by
To stream query results successfully, the IAM principal with permission to call
IAM principals with permission to the Amazon S3 |
![]() |
GetQueryResultsAsync(GetQueryResultsRequest, CancellationToken) |
Streams the results of a single query execution specified by
To stream query results successfully, the IAM principal with permission to call
IAM principals with permission to the Amazon S3 |
![]() |
GetTableMetadata(GetTableMetadataRequest) |
Returns table metadata for the specified catalog, database, and table. |
![]() |
GetTableMetadataAsync(GetTableMetadataRequest, CancellationToken) |
Returns table metadata for the specified catalog, database, and table. |
![]() |
GetWorkGroup(GetWorkGroupRequest) |
Returns information about the workgroup with the specified name. |
![]() |
GetWorkGroupAsync(GetWorkGroupRequest, CancellationToken) |
Returns information about the workgroup with the specified name. |
![]() |
ListDatabases(ListDatabasesRequest) |
Lists the databases in the specified data catalog. |
![]() |
ListDatabasesAsync(ListDatabasesRequest, CancellationToken) |
Lists the databases in the specified data catalog. |
![]() |
ListDataCatalogs(ListDataCatalogsRequest) |
Lists the data catalogs in the current Amazon Web Services account. |
![]() |
ListDataCatalogsAsync(ListDataCatalogsRequest, CancellationToken) |
Lists the data catalogs in the current Amazon Web Services account. |
![]() |
ListEngineVersions(ListEngineVersionsRequest) |
Returns a list of engine versions that are available to choose from, including the Auto option. |
![]() |
ListEngineVersionsAsync(ListEngineVersionsRequest, CancellationToken) |
Returns a list of engine versions that are available to choose from, including the Auto option. |
![]() |
ListNamedQueries(ListNamedQueriesRequest) |
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 Amazon Web Services SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide. |
![]() |
ListNamedQueriesAsync(ListNamedQueriesRequest, CancellationToken) |
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 Amazon Web Services SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide. |
![]() |
ListPreparedStatements(ListPreparedStatementsRequest) |
Lists the prepared statements in the specfied workgroup. |
![]() |
ListPreparedStatementsAsync(ListPreparedStatementsRequest, CancellationToken) |
Lists the prepared statements in the specfied workgroup. |
![]() |
ListQueryExecutions(ListQueryExecutionsRequest) |
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 Amazon Web Services SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide. |
![]() |
ListQueryExecutionsAsync(ListQueryExecutionsRequest, CancellationToken) |
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 Amazon Web Services SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide. |
![]() |
ListTableMetadata(ListTableMetadataRequest) |
Lists the metadata for the tables in the specified data catalog database. |
![]() |
ListTableMetadataAsync(ListTableMetadataRequest, CancellationToken) |
Lists the metadata for the tables in the specified data catalog database. |
![]() |
ListTagsForResource(ListTagsForResourceRequest) |
Lists the tags associated with an Athena workgroup or data catalog resource. |
![]() |
ListTagsForResourceAsync(ListTagsForResourceRequest, CancellationToken) |
Lists the tags associated with an Athena workgroup or data catalog resource. |
![]() |
ListWorkGroups(ListWorkGroupsRequest) |
Lists available workgroups for the account. |
![]() |
ListWorkGroupsAsync(ListWorkGroupsRequest, CancellationToken) |
Lists available workgroups for the account. |
![]() |
StartQueryExecution(StartQueryExecutionRequest) |
Runs the SQL query statements contained in the |
![]() |
StartQueryExecutionAsync(StartQueryExecutionRequest, CancellationToken) |
Runs the SQL query statements contained in the |
![]() |
StopQueryExecution(StopQueryExecutionRequest) |
Stops a query execution. Requires you to have access to the workgroup in which the query ran. For code samples using the Amazon Web Services SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide. |
![]() |
StopQueryExecutionAsync(StopQueryExecutionRequest, CancellationToken) |
Stops a query execution. Requires you to have access to the workgroup in which the query ran. For code samples using the Amazon Web Services SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide. |
![]() |
TagResource(TagResourceRequest) |
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. 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. |
![]() |
TagResourceAsync(TagResourceRequest, CancellationToken) |
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. 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(UntagResourceRequest) |
Removes one or more tags from a data catalog or workgroup resource. |
![]() |
UntagResourceAsync(UntagResourceRequest, CancellationToken) |
Removes one or more tags from a data catalog or workgroup resource. |
![]() |
UpdateDataCatalog(UpdateDataCatalogRequest) |
Updates the data catalog that has the specified name. |
![]() |
UpdateDataCatalogAsync(UpdateDataCatalogRequest, CancellationToken) |
Updates the data catalog that has the specified name. |
![]() |
UpdateNamedQuery(UpdateNamedQueryRequest) |
Updates a NamedQuery object. The database or workgroup cannot be updated. |
![]() |
UpdateNamedQueryAsync(UpdateNamedQueryRequest, CancellationToken) |
Updates a NamedQuery object. The database or workgroup cannot be updated. |
![]() |
UpdatePreparedStatement(UpdatePreparedStatementRequest) |
Updates a prepared statement. |
![]() |
UpdatePreparedStatementAsync(UpdatePreparedStatementRequest, CancellationToken) |
Updates a prepared statement. |
![]() |
UpdateWorkGroup(UpdateWorkGroupRequest) |
Updates the workgroup with the specified name. The workgroup's name cannot be changed. |
![]() |
UpdateWorkGroupAsync(UpdateWorkGroupRequest, CancellationToken) |
Updates the workgroup with the specified name. The workgroup's name cannot be changed. |
Name | Description | |
---|---|---|
![]() |
AfterResponseEvent | Inherited from Amazon.Runtime.AmazonServiceClient. |
![]() |
BeforeRequestEvent | Inherited from Amazon.Runtime.AmazonServiceClient. |
![]() |
ExceptionEvent | Inherited from Amazon.Runtime.AmazonServiceClient. |
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5, 4.0, 3.5