libZSservicesZSamazonka-athenaZSamazonka-athena
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

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

  • 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.

  • 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.

  • 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
Eq StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Read StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Show StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Generic StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Associated Types

type Rep StartQueryExecution :: Type -> Type #

NFData StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Methods

rnf :: StartQueryExecution -> () #

Hashable StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

ToJSON StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

AWSRequest StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Associated Types

type AWSResponse 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

type Rep StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

type Rep StartQueryExecution = D1 ('MetaData "StartQueryExecution" "Amazonka.Athena.StartQueryExecution" "libZSservicesZSamazonka-athenaZSamazonka-athena" 'False) (C1 ('MetaCons "StartQueryExecution'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "queryExecutionContext") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe QueryExecutionContext)) :*: S1 ('MetaSel ('Just "resultConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ResultConfiguration))) :*: (S1 ('MetaSel ('Just "clientRequestToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "workGroup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "queryString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse StartQueryExecution Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

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:queryExecutionContext:StartQueryExecution', startQueryExecution_queryExecutionContext - The database within which the query executes.

$sel:resultConfiguration: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.

$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.

$sel:workGroup:StartQueryExecution', startQueryExecution_workGroup - The name of the workgroup in which the query is being started.

$sel:queryString:StartQueryExecution', startQueryExecution_queryString - The SQL query statements to be executed.

Request Lenses

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_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_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
Eq StartQueryExecutionResponse Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Read StartQueryExecutionResponse Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Show StartQueryExecutionResponse Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Generic StartQueryExecutionResponse Source # 
Instance details

Defined in Amazonka.Athena.StartQueryExecution

Associated Types

type Rep StartQueryExecutionResponse :: Type -> Type #

NFData 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" "libZSservicesZSamazonka-athenaZSamazonka-athena" '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:

$sel:queryExecutionId: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.