amazonka-athena-2.0: Amazon Athena SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Athena.StartQueryExecution

Description

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 Amazon Web Services SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.

Synopsis

Creating a Request

data StartQueryExecution Source #

See: newStartQueryExecution smart constructor.

Constructors

StartQueryExecution' 

Fields

  • clientRequestToken :: Maybe Text

    A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another StartQueryExecution request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the QueryString, an error is returned.

    This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.

  • executionParameters :: Maybe (NonEmpty Text)

    A list of values for the parameters in a query. The values are applied sequentially to the parameters in the query in the order in which the parameters occur.

  • queryExecutionContext :: Maybe QueryExecutionContext

    The database within which the query executes.

  • resultConfiguration :: Maybe ResultConfiguration

    Specifies information about where and how to save the results of the query execution. If the query runs in a workgroup, then workgroup's settings may override query settings. This affects the query results location. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

  • resultReuseConfiguration :: Maybe ResultReuseConfiguration

    Specifies the query result reuse behavior for the query.

  • workGroup :: Maybe Text

    The name of the workgroup in which the query is being started.

  • queryString :: Text

    The SQL query statements to be executed.

Instances

Instances details
ToJSON StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

ToHeaders StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

ToPath StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

ToQuery StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

AWSRequest StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Associated Types

type AWSResponse StartQueryExecution #

Generic StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Associated Types

type Rep StartQueryExecution :: Type -> Type #

Read StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Show StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

NFData StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Methods

rnf :: StartQueryExecution -> () #

Eq StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Hashable StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

type AWSResponse StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

type Rep StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

type Rep StartQueryExecution = D1 ('MetaData "StartQueryExecution" "Amazonka.Athena.StartQueryExecution" "amazonka-athena-2.0-1BJA3HTvHJNEzwQRaEw59w" 'False) (C1 ('MetaCons "StartQueryExecution'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientRequestToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "executionParameters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (NonEmpty Text))) :*: S1 ('MetaSel ('Just "queryExecutionContext") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe QueryExecutionContext)))) :*: ((S1 ('MetaSel ('Just "resultConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ResultConfiguration)) :*: S1 ('MetaSel ('Just "resultReuseConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ResultReuseConfiguration))) :*: (S1 ('MetaSel ('Just "workGroup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "queryString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newStartQueryExecution Source #

Create a value of StartQueryExecution with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:clientRequestToken:StartQueryExecution', startQueryExecution_clientRequestToken - A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another StartQueryExecution request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the QueryString, an error is returned.

This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.

StartQueryExecution, startQueryExecution_executionParameters - A list of values for the parameters in a query. The values are applied sequentially to the parameters in the query in the order in which the parameters occur.

StartQueryExecution, startQueryExecution_queryExecutionContext - The database within which the query executes.

StartQueryExecution, startQueryExecution_resultConfiguration - Specifies information about where and how to save the results of the query execution. If the query runs in a workgroup, then workgroup's settings may override query settings. This affects the query results location. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

StartQueryExecution, startQueryExecution_resultReuseConfiguration - Specifies the query result reuse behavior for the query.

StartQueryExecution, startQueryExecution_workGroup - The name of the workgroup in which the query is being started.

StartQueryExecution, startQueryExecution_queryString - The SQL query statements to be executed.

Request Lenses

startQueryExecution_clientRequestToken :: Lens' StartQueryExecution (Maybe Text) Source #

A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another StartQueryExecution request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the QueryString, an error is returned.

This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.

startQueryExecution_executionParameters :: Lens' StartQueryExecution (Maybe (NonEmpty Text)) Source #

A list of values for the parameters in a query. The values are applied sequentially to the parameters in the query in the order in which the parameters occur.

startQueryExecution_resultConfiguration :: Lens' StartQueryExecution (Maybe ResultConfiguration) Source #

Specifies information about where and how to save the results of the query execution. If the query runs in a workgroup, then workgroup's settings may override query settings. This affects the query results location. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

startQueryExecution_workGroup :: Lens' StartQueryExecution (Maybe Text) Source #

The name of the workgroup in which the query is being started.

startQueryExecution_queryString :: Lens' StartQueryExecution Text Source #

The SQL query statements to be executed.

Destructuring the Response

data StartQueryExecutionResponse Source #

See: newStartQueryExecutionResponse smart constructor.

Constructors

StartQueryExecutionResponse' 

Fields

Instances

Instances details
Generic StartQueryExecutionResponse Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Associated Types

type Rep StartQueryExecutionResponse :: Type -> Type #

Read StartQueryExecutionResponse Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Show StartQueryExecutionResponse Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

NFData StartQueryExecutionResponse Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Eq StartQueryExecutionResponse Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

type Rep StartQueryExecutionResponse Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

type Rep StartQueryExecutionResponse = D1 ('MetaData "StartQueryExecutionResponse" "Amazonka.Athena.StartQueryExecution" "amazonka-athena-2.0-1BJA3HTvHJNEzwQRaEw59w" 'False) (C1 ('MetaCons "StartQueryExecutionResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "queryExecutionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newStartQueryExecutionResponse Source #

Create a value of StartQueryExecutionResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

StartQueryExecutionResponse, startQueryExecutionResponse_queryExecutionId - The unique ID of the query that ran as a result of this request.

$sel:httpStatus:StartQueryExecutionResponse', startQueryExecutionResponse_httpStatus - The response's http status code.

Response Lenses

startQueryExecutionResponse_queryExecutionId :: Lens' StartQueryExecutionResponse (Maybe Text) Source #

The unique ID of the query that ran as a result of this request.