Athena Request : Post Node

The Athena Request: Post Node request allows you to connect to Amazon Athena, a serverless interactive query service that allows users to analyze data directly in Amazon S3 using standard SQL. It is designed for fast, ad hoc analysis of large volumes of data stored in S3, without the need to manage servers or data warehouses.

Node Properties

Athena Request S3: Post Node Configuration

  • Target : This is the action that will be called to send the request to the Amazon Athena service to retrieve query results using the API.
  • Body: The body of the request in JSON format, which contains the details of the query you want to execute on Athena, including parameters such as the database name, the SQL query, and additional settings.
  • Key: The AWS Access Key ID used to authenticate the request to the Amazon API. This key should have the necessary permissions to execute queries in Athena.
  • Secret: The AWS Secret Access Key associated with the Access Key ID, used to sign the request. Like the Access Key, it should be kept secure and never exposed publicly.
  • Region: The AWS region where the Amazon Athena service is being used. The region should match the location of the database and the S3 bucket you are using.

Parameter Example

The example below was based on a data query processing request to be executed by Amazon Athena, it is possible to search for a query already processed according to the Amazon Athena documentation.

  • Target AmazonAthena.StartQueryExecution
  • Body

      {
        "ClientRequestTokens": "17266675951197564999999999998993",
        "QueryString": "SELECT * FROM your_table",
        "QueryExecutionContext": {
            "Database": "your_database"
        },
        "ResultConfiguration": {
            "OutputLocation": "your_bucket_saved_query"
        },
        "WorkGroup": "your-workgroup"
      }
  • Key AKIAEXAMPLE
  • Secret wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
  • Region us-west-2

Result Path

The success or failure of the operation can optionally be placed at the specified payload path. If the operation fails, the result object will contain an error key in addition to the success state.

Node Example

The following is an example of a successful operation:

  {
    "response": {
      "requestDuration": 3068,
      "statusCode": 200,
      "body": {
        "QueryExecutionId": "787207bb-56f3-4bda-b98c-b24d99ed699c"
      }
    }
  }

Node Errors

The following is an example of a failed operation:

  {
    "response": {
      "requestDuration": 3068,
      "statusCode": 400,
      "body": {
        "__type": "InvalidRequestException",
        "AthenaErrorCode": "INVALID_INPUT",
        "ErrorCode": "INVALID_INPUT",
        "Message": "clientRequestToken is null or empty"
      }
    }
  }

Was this page helpful?


Still looking for help? You can also search the WEGnology Forums or submit your question there.