Query Query

yaml
type: "io.kestra.plugin.aws.athena.Query"

Query an Athena table.

The query will wait for completion, except if fetchMode is set to NONE, and will output converted rows. Row conversion is based on the types listed here, complex data types like array, map and struct will be converted to a string.

Examples

yaml
id: "query"
type: "io.kestra.plugin.aws.athena.Query"
id: query
type: io.kestra.plugin.aws.athena.Query
database: my_database
outputLocation: s3://some-s3-bucket
query: |
  select * from cloudfront_logs limit 10

Properties

database

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

Athena database

fetchType

  • Type: string
  • Dynamic:
  • Required: ✔️
  • Default: STORE
  • Possible Values:
    • STORE
    • FETCH
    • FETCH_ONE
    • NONE

The way you want to store the data

FETCH_ONE outputs the first row, FETCH outputs all the rows, STORE stores all rows in a file, NONE does nothing — in this case, the task submits the query without waiting for its completion.

outputLocation

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

Athena output location.

The query results will be stored in this output location. Must be an existing S3 bucket.

query

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

Athena SQL query

skipHeader

  • Type: boolean
  • Dynamic:
  • Required: ✔️
  • Default: true

Whether to skip the first row which is usually the header

accessKeyId

  • Type: string
  • Dynamic: ✔️
  • Required:

The Access Key Id in order to connect to AWS

If no connection is defined, we will use default DefaultCredentialsProvider that will try to guess the value

catalog

  • Type: string
  • Dynamic: ✔️
  • Required:

Athena catalog

compatibilityMode

  • Type: boolean
  • Dynamic:
  • Required:
  • Default: false

endpointOverride

  • Type: string
  • Dynamic: ✔️
  • Required:

The endpoint with which the SDK should communicate.

Should normally not be used except for local development.

region

  • Type: string
  • Dynamic: ✔️
  • Required:

The region with which the SDK should communicate.

secretKeyId

  • Type: string
  • Dynamic: ✔️
  • Required:

The Secret Key Id in order to connect to AWS

If no connection is defined, we will use default DefaultCredentialsProvider that will try to guess the value

sessionToken

  • Type: string
  • Dynamic: ✔️
  • Required:

The he AWS session token, retrieved from an AWS token service, used for authenticating that this user has received temporary permission to access some resource.

If no connection is defined, we will use default DefaultCredentialsProvider that will try to guess the value

Outputs

queryExecutionId

  • Type: string

The query execution identifier

row

  • Type: object

Map containing the first row of fetched data

Only populated if using fetchType=FETCH_ONE.

rows

  • Type: array

List containing the fetched data

Only populated if using fetchType=FETCH.

size

  • Type: integer

The size of the fetched rows

uri

  • Type: string

The uri of stored data

Only populated if using fetchType=STORE