This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-4.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-4.22.x by this push:
     new a7ba354899d5 [backport camel-4.22.x] CAMEL-26105: camel-aws2-athena - 
the queryString option takes precedence over the message body (#28405)
a7ba354899d5 is described below

commit a7ba354899d5e83a46751ce38a0011c66adfcf3d
Author: Claus Ibsen <[email protected]>
AuthorDate: Sun Oct 25 08:41:52 2026 +0100

    [backport camel-4.22.x] CAMEL-26105: camel-aws2-athena - the queryString 
option takes precedence over the message body (#28405)
    
    Signed-off-by: Claus Ibsen <[email protected]>
    Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
---
 .../camel/catalog/components/aws2-athena.json      |   6 +-
 .../camel/catalog/docs/aws2-athena-component.adoc  |  11 ++
 .../camel/component/aws2/athena/aws2-athena.json   |   6 +-
 .../src/main/docs/aws2-athena-component.adoc       |  11 ++
 .../aws2/athena/Athena2Configuration.java          |  12 +-
 .../component/aws2/athena/Athena2Constants.java    |   5 +-
 .../component/aws2/athena/Athena2Producer.java     |  19 ++-
 .../aws2/athena/AmazonAthenaClientMock.java        |  10 ++
 .../athena/Athena2ProducerQueryStringTest.java     | 157 +++++++++++++++++++++
 .../ROOT/pages/camel-4x-upgrade-guide-4_22.adoc    |  15 ++
 .../dsl/Aws2AthenaComponentBuilderFactory.java     |   9 +-
 .../dsl/Athena2EndpointBuilderFactory.java         |  16 ++-
 12 files changed, 249 insertions(+), 28 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-athena.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-athena.json
index 09b7827f342c..007ea7bfb547 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-athena.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws2-athena.json
@@ -37,7 +37,7 @@
     "outputType": { "index": 10, "kind": "property", "displayName": "Output 
Type", "group": "producer", "label": "", "required": false, "type": "enum", 
"javaType": "org.apache.camel.component.aws2.athena.Athena2OutputType", "enum": 
[ "StreamList", "SelectList", "S3Pointer" ], "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "StreamList", "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "de [...]
     "overrideEndpoint": { "index": 11, "kind": "property", "displayName": 
"Override Endpoint", "group": "producer", "label": "", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "Set the need for 
overriding the endpoint. This option needs to be used in combina [...]
     "queryExecutionId": { "index": 12, "kind": "property", "displayName": 
"Query Execution Id", "group": "producer", "label": "", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "The unique ID 
identifying the query execution." },
-    "queryString": { "index": 13, "kind": "property", "displayName": "Query 
String", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "The SQL query to run. 
Except for simple queries, prefer setting this as the body of the Exchange or 
as a h [...]
+    "queryString": { "index": 13, "kind": "property", "displayName": "Query 
String", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "The SQL query to run. 
The CamelAwsAthenaQueryString header takes precedence over this option, and the 
mess [...]
     "region": { "index": 14, "kind": "property", "displayName": "Region", 
"group": "producer", "label": "", "required": false, "type": "enum", 
"javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", 
"eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", 
"ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", 
"eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", 
"eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-nort [...]
     "resetWaitTimeoutOnRetry": { "index": 15, "kind": "property", 
"displayName": "Reset Wait Timeout On Retry", "group": "producer", "label": 
"producer", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true, 
"configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "Reset the waitTimeout 
countdown in the event of a query r [...]
     "retry": { "index": 16, "kind": "property", "displayName": "Retry", 
"group": "producer", "label": "producer", "required": false, "type": "enum", 
"javaType": "java.lang.String", "enum": [ "never", "always", "retryable", 
"exhausted", "generic" ], "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": "never", "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "Optional comma separ 
[...]
@@ -77,7 +77,7 @@
     "CamelAwsAthenaOutputType": { "index": 9, "kind": "header", "displayName": 
"", "group": "getQueryResults", "label": "getQueryResults", "required": false, 
"javaType": "org.apache.camel.component.aws2.athena.Athena2OutputType", "enum": 
[ "StreamList", "SelectList", "S3Pointer" ], "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "How 
query results should be returned. One of StreamList (default - return a 
GetQueryResultsIterable that can pag [...]
     "CamelAwsAthenaQueryExecutionState": { "index": 10, "kind": "header", 
"displayName": "", "group": "getQueryExecution getQueryResults 
startQueryExecution", "label": "getQueryExecution getQueryResults 
startQueryExecution", "required": false, "javaType": 
"software.amazon.awssdk.services.athena.model.QueryExecutionState", "enum": [ 
"QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "null" ], 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "descripti [...]
     "CamelAwsAthenaClientRequestToken": { "index": 11, "kind": "header", 
"displayName": "", "group": "startQueryExecution", "label": 
"startQueryExecution", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "A unique string to ensure issues queries are idempotent. It is 
unlikely you will need to set this.", "constantName": 
"org.apache.camel.component.aws2.athena.Athena2Constants#CLIENT_REQUEST_TOKEN" 
},
-    "CamelAwsAthenaQueryString": { "index": 12, "kind": "header", 
"displayName": "", "group": "startQueryExecution", "label": 
"startQueryExecution", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The SQL query to run. Except for simple queries, prefer setting 
this as the body of the Exchange or as this header to avoid having to deal with 
URL encoding issues.", "constantName": "org.apache.camel.comp [...]
+    "CamelAwsAthenaQueryString": { "index": 12, "kind": "header", 
"displayName": "", "group": "startQueryExecution", "label": 
"startQueryExecution", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The SQL query to run. It takes precedence over the queryString 
option and the message body. Except for simple queries, prefer setting the 
query in this header or as the body of the Exchange to avoid having [...]
     "CamelAwsAthenaEncryptionOption": { "index": 13, "kind": "header", 
"displayName": "", "group": "startQueryExecution", "label": 
"startQueryExecution", "required": false, "javaType": 
"software.amazon.awssdk.services.athena.model.EncryptionOption", "enum": [ 
"SSE_S3", "SSE_KMS", "CSE_KMS", "null" ], "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
encryption type to use when storing query results in S3.", "constantName": 
"org.apache.ca [...]
     "CamelAwsAthenaKmsKey": { "index": 14, "kind": "header", "displayName": 
"", "group": "startQueryExecution", "label": "startQueryExecution", "required": 
false, "javaType": "String", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "description": "For SSE-KMS and CSE-KMS, 
this is the KMS key ARN or ID.", "constantName": 
"org.apache.camel.component.aws2.athena.Athena2Constants#KMS_KEY" },
     "CamelAwsAthenaWaitTimeout": { "index": 15, "kind": "header", 
"displayName": "", "group": "startQueryExecution", "label": 
"startQueryExecution", "required": false, "javaType": "long", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "Optional max wait time in millis to wait for a successful query 
completion. See the section 'Waiting for Query Completion and Retrying Failed 
Queries' to learn more.", "constantName": "org.apache.camel.compo [...]
@@ -102,7 +102,7 @@
     "outputType": { "index": 9, "kind": "parameter", "displayName": "Output 
Type", "group": "producer", "label": "", "required": false, "type": "enum", 
"javaType": "org.apache.camel.component.aws2.athena.Athena2OutputType", "enum": 
[ "StreamList", "SelectList", "S3Pointer" ], "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "StreamList", "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "de [...]
     "overrideEndpoint": { "index": 10, "kind": "parameter", "displayName": 
"Override Endpoint", "group": "producer", "label": "", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "Set the need for 
overriding the endpoint. This option needs to be used in combin [...]
     "queryExecutionId": { "index": 11, "kind": "parameter", "displayName": 
"Query Execution Id", "group": "producer", "label": "", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "The unique ID 
identifying the query execution." },
-    "queryString": { "index": 12, "kind": "parameter", "displayName": "Query 
String", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "The SQL query to run. 
Except for simple queries, prefer setting this as the body of the Exchange or 
as a  [...]
+    "queryString": { "index": 12, "kind": "parameter", "displayName": "Query 
String", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "The SQL query to run. 
The CamelAwsAthenaQueryString header takes precedence over this option, and the 
mes [...]
     "region": { "index": 13, "kind": "parameter", "displayName": "Region", 
"group": "producer", "label": "", "required": false, "type": "enum", 
"javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", 
"eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", 
"ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", 
"eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", 
"eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-nor [...]
     "resetWaitTimeoutOnRetry": { "index": 14, "kind": "parameter", 
"displayName": "Reset Wait Timeout On Retry", "group": "producer", "label": 
"producer", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true, 
"configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "Reset the waitTimeout 
countdown in the event of a query  [...]
     "retry": { "index": 15, "kind": "parameter", "displayName": "Retry", 
"group": "producer", "label": "producer", "required": false, "type": "enum", 
"javaType": "java.lang.String", "enum": [ "never", "always", "retryable", 
"exhausted", "generic" ], "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": "never", "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "Optional comma sepa [...]
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-athena-component.adoc
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-athena-component.adoc
index 75b14a9dc4e7..9f862099281c 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-athena-component.adoc
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-athena-component.adoc
@@ -43,6 +43,17 @@ You have to provide the amazonAthenaClient in the
 Registry or your accessKey and secretKey to access
 the https://aws.amazon.com/athena/[AWS Athena] service.
 
+== Usage
+
+=== Where the SQL comes from
+
+The `startQueryExecution` operation, which is the default operation, runs the 
SQL of the `CamelAwsAthenaQueryString`
+header, and when the header is not set, the SQL of the `queryString` option. 
The message body is used as the SQL only
+when neither the header nor the `queryString` option is set, as in the 
examples below. When no SQL is found, the
+exchange fails with an `IllegalArgumentException`.
+
+So an endpoint configured with `queryString` runs that query each time a 
message arrives, whatever its body.
+
 == Examples
 
 === Producer Examples
diff --git 
a/components/camel-aws/camel-aws2-athena/src/generated/resources/META-INF/org/apache/camel/component/aws2/athena/aws2-athena.json
 
b/components/camel-aws/camel-aws2-athena/src/generated/resources/META-INF/org/apache/camel/component/aws2/athena/aws2-athena.json
index 09b7827f342c..007ea7bfb547 100644
--- 
a/components/camel-aws/camel-aws2-athena/src/generated/resources/META-INF/org/apache/camel/component/aws2/athena/aws2-athena.json
+++ 
b/components/camel-aws/camel-aws2-athena/src/generated/resources/META-INF/org/apache/camel/component/aws2/athena/aws2-athena.json
@@ -37,7 +37,7 @@
     "outputType": { "index": 10, "kind": "property", "displayName": "Output 
Type", "group": "producer", "label": "", "required": false, "type": "enum", 
"javaType": "org.apache.camel.component.aws2.athena.Athena2OutputType", "enum": 
[ "StreamList", "SelectList", "S3Pointer" ], "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "StreamList", "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "de [...]
     "overrideEndpoint": { "index": 11, "kind": "property", "displayName": 
"Override Endpoint", "group": "producer", "label": "", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "Set the need for 
overriding the endpoint. This option needs to be used in combina [...]
     "queryExecutionId": { "index": 12, "kind": "property", "displayName": 
"Query Execution Id", "group": "producer", "label": "", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "The unique ID 
identifying the query execution." },
-    "queryString": { "index": 13, "kind": "property", "displayName": "Query 
String", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "The SQL query to run. 
Except for simple queries, prefer setting this as the body of the Exchange or 
as a h [...]
+    "queryString": { "index": 13, "kind": "property", "displayName": "Query 
String", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "The SQL query to run. 
The CamelAwsAthenaQueryString header takes precedence over this option, and the 
mess [...]
     "region": { "index": 14, "kind": "property", "displayName": "Region", 
"group": "producer", "label": "", "required": false, "type": "enum", 
"javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", 
"eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", 
"ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", 
"eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", 
"eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-nort [...]
     "resetWaitTimeoutOnRetry": { "index": 15, "kind": "property", 
"displayName": "Reset Wait Timeout On Retry", "group": "producer", "label": 
"producer", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true, 
"configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "Reset the waitTimeout 
countdown in the event of a query r [...]
     "retry": { "index": 16, "kind": "property", "displayName": "Retry", 
"group": "producer", "label": "producer", "required": false, "type": "enum", 
"javaType": "java.lang.String", "enum": [ "never", "always", "retryable", 
"exhausted", "generic" ], "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": "never", "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "Optional comma separ 
[...]
@@ -77,7 +77,7 @@
     "CamelAwsAthenaOutputType": { "index": 9, "kind": "header", "displayName": 
"", "group": "getQueryResults", "label": "getQueryResults", "required": false, 
"javaType": "org.apache.camel.component.aws2.athena.Athena2OutputType", "enum": 
[ "StreamList", "SelectList", "S3Pointer" ], "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "How 
query results should be returned. One of StreamList (default - return a 
GetQueryResultsIterable that can pag [...]
     "CamelAwsAthenaQueryExecutionState": { "index": 10, "kind": "header", 
"displayName": "", "group": "getQueryExecution getQueryResults 
startQueryExecution", "label": "getQueryExecution getQueryResults 
startQueryExecution", "required": false, "javaType": 
"software.amazon.awssdk.services.athena.model.QueryExecutionState", "enum": [ 
"QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "null" ], 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "descripti [...]
     "CamelAwsAthenaClientRequestToken": { "index": 11, "kind": "header", 
"displayName": "", "group": "startQueryExecution", "label": 
"startQueryExecution", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "A unique string to ensure issues queries are idempotent. It is 
unlikely you will need to set this.", "constantName": 
"org.apache.camel.component.aws2.athena.Athena2Constants#CLIENT_REQUEST_TOKEN" 
},
-    "CamelAwsAthenaQueryString": { "index": 12, "kind": "header", 
"displayName": "", "group": "startQueryExecution", "label": 
"startQueryExecution", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The SQL query to run. Except for simple queries, prefer setting 
this as the body of the Exchange or as this header to avoid having to deal with 
URL encoding issues.", "constantName": "org.apache.camel.comp [...]
+    "CamelAwsAthenaQueryString": { "index": 12, "kind": "header", 
"displayName": "", "group": "startQueryExecution", "label": 
"startQueryExecution", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The SQL query to run. It takes precedence over the queryString 
option and the message body. Except for simple queries, prefer setting the 
query in this header or as the body of the Exchange to avoid having [...]
     "CamelAwsAthenaEncryptionOption": { "index": 13, "kind": "header", 
"displayName": "", "group": "startQueryExecution", "label": 
"startQueryExecution", "required": false, "javaType": 
"software.amazon.awssdk.services.athena.model.EncryptionOption", "enum": [ 
"SSE_S3", "SSE_KMS", "CSE_KMS", "null" ], "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
encryption type to use when storing query results in S3.", "constantName": 
"org.apache.ca [...]
     "CamelAwsAthenaKmsKey": { "index": 14, "kind": "header", "displayName": 
"", "group": "startQueryExecution", "label": "startQueryExecution", "required": 
false, "javaType": "String", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "description": "For SSE-KMS and CSE-KMS, 
this is the KMS key ARN or ID.", "constantName": 
"org.apache.camel.component.aws2.athena.Athena2Constants#KMS_KEY" },
     "CamelAwsAthenaWaitTimeout": { "index": 15, "kind": "header", 
"displayName": "", "group": "startQueryExecution", "label": 
"startQueryExecution", "required": false, "javaType": "long", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "Optional max wait time in millis to wait for a successful query 
completion. See the section 'Waiting for Query Completion and Retrying Failed 
Queries' to learn more.", "constantName": "org.apache.camel.compo [...]
@@ -102,7 +102,7 @@
     "outputType": { "index": 9, "kind": "parameter", "displayName": "Output 
Type", "group": "producer", "label": "", "required": false, "type": "enum", 
"javaType": "org.apache.camel.component.aws2.athena.Athena2OutputType", "enum": 
[ "StreamList", "SelectList", "S3Pointer" ], "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": "StreamList", "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "de [...]
     "overrideEndpoint": { "index": 10, "kind": "parameter", "displayName": 
"Override Endpoint", "group": "producer", "label": "", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "Set the need for 
overriding the endpoint. This option needs to be used in combin [...]
     "queryExecutionId": { "index": 11, "kind": "parameter", "displayName": 
"Query Execution Id", "group": "producer", "label": "", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "The unique ID 
identifying the query execution." },
-    "queryString": { "index": 12, "kind": "parameter", "displayName": "Query 
String", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "The SQL query to run. 
Except for simple queries, prefer setting this as the body of the Exchange or 
as a  [...]
+    "queryString": { "index": 12, "kind": "parameter", "displayName": "Query 
String", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "The SQL query to run. 
The CamelAwsAthenaQueryString header takes precedence over this option, and the 
mes [...]
     "region": { "index": 13, "kind": "parameter", "displayName": "Region", 
"group": "producer", "label": "", "required": false, "type": "enum", 
"javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", 
"eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", 
"ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", 
"eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", 
"eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-nor [...]
     "resetWaitTimeoutOnRetry": { "index": 14, "kind": "parameter", 
"displayName": "Reset Wait Timeout On Retry", "group": "producer", "label": 
"producer", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": true, 
"configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "Reset the waitTimeout 
countdown in the event of a query  [...]
     "retry": { "index": 15, "kind": "parameter", "displayName": "Retry", 
"group": "producer", "label": "producer", "required": false, "type": "enum", 
"javaType": "java.lang.String", "enum": [ "never", "always", "retryable", 
"exhausted", "generic" ], "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": "never", "configurationClass": 
"org.apache.camel.component.aws2.athena.Athena2Configuration", 
"configurationField": "configuration", "description": "Optional comma sepa [...]
diff --git 
a/components/camel-aws/camel-aws2-athena/src/main/docs/aws2-athena-component.adoc
 
b/components/camel-aws/camel-aws2-athena/src/main/docs/aws2-athena-component.adoc
index 75b14a9dc4e7..9f862099281c 100644
--- 
a/components/camel-aws/camel-aws2-athena/src/main/docs/aws2-athena-component.adoc
+++ 
b/components/camel-aws/camel-aws2-athena/src/main/docs/aws2-athena-component.adoc
@@ -43,6 +43,17 @@ You have to provide the amazonAthenaClient in the
 Registry or your accessKey and secretKey to access
 the https://aws.amazon.com/athena/[AWS Athena] service.
 
+== Usage
+
+=== Where the SQL comes from
+
+The `startQueryExecution` operation, which is the default operation, runs the 
SQL of the `CamelAwsAthenaQueryString`
+header, and when the header is not set, the SQL of the `queryString` option. 
The message body is used as the SQL only
+when neither the header nor the `queryString` option is set, as in the 
examples below. When no SQL is found, the
+exchange fails with an `IllegalArgumentException`.
+
+So an endpoint configured with `queryString` runs that query each time a 
message arrives, whatever its body.
+
 == Examples
 
 === Producer Examples
diff --git 
a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Configuration.java
 
b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Configuration.java
index f59e1dd3173c..0a4b5eaadc51 100644
--- 
a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Configuration.java
+++ 
b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Configuration.java
@@ -61,8 +61,10 @@ public class Athena2Configuration implements Cloneable, 
AwsCommonConfiguration {
     @UriParam(label = "advanced",
               description = "A unique string to ensure issues queries are 
idempotent. It is unlikely you will need to set this.")
     private String clientRequestToken;
-    @UriParam(description = "The SQL query to run. Except for simple queries, 
prefer setting this as the body of the "
-                            + "Exchange or as a header using 
Athena2Constants.QUERY_STRING to avoid having to deal with URL encoding 
issues.")
+    @UriParam(description = "The SQL query to run. The 
CamelAwsAthenaQueryString header takes precedence over this option,"
+                            + " and the message body is used as the query only 
when neither the header nor this option is set."
+                            + " Except for simple queries, prefer setting the 
query in the header or as the body of the Exchange"
+                            + " to avoid having to deal with URL encoding 
issues.")
     private String queryString;
     @UriParam(label = "security",
               description = "The encryption type to use when storing query 
results in S3. One of SSE_S3, SSE_KMS, or CSE_KMS.")
@@ -364,8 +366,10 @@ public class Athena2Configuration implements Cloneable, 
AwsCommonConfiguration {
     }
 
     /**
-     * The SQL query to run. Except for simple queries, prefer setting this as 
the {@code body} of the Exchange or as a
-     * header using {@link Athena2Constants#QUERY_STRING} to avoid having to 
deal with URL encoding issues.
+     * The SQL query to run. The {@link Athena2Constants#QUERY_STRING} header 
takes precedence over this option, and the
+     * message body is used as the query only when neither the header nor this 
option is set. Except for simple queries,
+     * prefer setting the query in the header or as the {@code body} of the 
Exchange to avoid having to deal with URL
+     * encoding issues.
      */
     public void setQueryString(String queryString) {
         this.queryString = queryString;
diff --git 
a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Constants.java
 
b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Constants.java
index 595ba7b24f4e..8a0d84c77d1f 100644
--- 
a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Constants.java
+++ 
b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Constants.java
@@ -81,8 +81,9 @@ public interface Athena2Constants {
               javaType = "String")
     String CLIENT_REQUEST_TOKEN = "CamelAwsAthenaClientRequestToken";
     @Metadata(label = "startQueryExecution",
-              description = "The SQL query to run.  Except for simple queries, 
prefer setting this as the `body` of the\n" +
-                            "Exchange or as this header to avoid having to 
deal with URL encoding issues.",
+              description = "The SQL query to run. It takes precedence over 
the queryString option and the message body.\n" +
+                            "Except for simple queries, prefer setting the 
query in this header or as the `body` of the\n" +
+                            "Exchange to avoid having to deal with URL 
encoding issues.",
               javaType = "String")
     String QUERY_STRING = "CamelAwsAthenaQueryString";
     @Metadata(label = "startQueryExecution", description = "The encryption 
type to use when storing query results in S3.",
diff --git 
a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Producer.java
 
b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Producer.java
index 7a7372fb9f89..f386b9d29354 100644
--- 
a/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Producer.java
+++ 
b/components/camel-aws/camel-aws2-athena/src/main/java/org/apache/camel/component/aws2/athena/Athena2Producer.java
@@ -27,6 +27,7 @@ import org.apache.camel.health.HealthCheckHelper;
 import org.apache.camel.health.WritableHealthCheckRepository;
 import org.apache.camel.support.DefaultProducer;
 import org.apache.camel.util.ObjectHelper;
+import org.apache.camel.util.URISupport;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import software.amazon.awssdk.services.athena.AthenaClient;
@@ -337,23 +338,31 @@ public class Athena2Producer extends DefaultProducer {
     }
 
     private String determineQueryString(final Exchange exchange) {
-        String queryString = exchange.getIn().getBody(String.class);
+        String queryString = 
exchange.getIn().getHeader(Athena2Constants.QUERY_STRING, String.class);
 
         if (ObjectHelper.isEmpty(queryString)) {
-            queryString = 
exchange.getIn().getHeader(Athena2Constants.QUERY_STRING, String.class);
+            queryString = getConfiguration().getQueryString();
         }
 
+        // the message body is the query only when neither the header nor the 
queryString option is set
         if (ObjectHelper.isEmpty(queryString)) {
-            queryString = getConfiguration().getQueryString();
+            queryString = exchange.getIn().getBody(String.class);
         }
 
         if (ObjectHelper.isEmpty(queryString)) {
-            throw new IllegalArgumentException("AWS Athena query string is 
required.");
+            throw new IllegalArgumentException(
+                    "AWS Athena query string is required. Set the " + 
Athena2Constants.QUERY_STRING
+                                               + " header, the queryString 
option or the message body.");
         }
 
         boolean includeTrace = determineIncludeTrace(exchange);
         if (includeTrace) {
-            queryString = "-- {\"fromEndpointUri\": \"" + 
exchange.getFromEndpoint().getEndpointUri() + "\", "
+            // an exchange that is not created by an endpoint has no from 
endpoint
+            Endpoint fromEndpoint = exchange.getFromEndpoint();
+            String fromEndpointUri = fromEndpoint != null
+                    ? "\"fromEndpointUri\": \"" + 
URISupport.sanitizeUri(fromEndpoint.getEndpointUri()) + "\", "
+                    : "";
+            queryString = "-- {" + fromEndpointUri
                           + "\"exchangeId\": \"" + exchange.getExchangeId() + 
"\", "
                           + "\"exchangeFromRouteId\": \"" + 
exchange.getFromRouteId() + "\"}"
                           + "\n"
diff --git 
a/components/camel-aws/camel-aws2-athena/src/test/java/org/apache/camel/component/aws2/athena/AmazonAthenaClientMock.java
 
b/components/camel-aws/camel-aws2-athena/src/test/java/org/apache/camel/component/aws2/athena/AmazonAthenaClientMock.java
index adce2f244fa0..b95396e1b0d4 100644
--- 
a/components/camel-aws/camel-aws2-athena/src/test/java/org/apache/camel/component/aws2/athena/AmazonAthenaClientMock.java
+++ 
b/components/camel-aws/camel-aws2-athena/src/test/java/org/apache/camel/component/aws2/athena/AmazonAthenaClientMock.java
@@ -45,6 +45,15 @@ public class AmazonAthenaClientMock implements AthenaClient {
 
     private Queue<String> startQueryExecutionResults = new LinkedList<>();
     private Queue<QueryExecution> getQueryExecutionResults = new 
LinkedList<>();
+    private volatile StartQueryExecutionRequest lastStartQueryExecutionRequest;
+
+    /**
+     * The request of the last call to {@link 
#startQueryExecution(StartQueryExecutionRequest)}, or null if it was not
+     * called.
+     */
+    public StartQueryExecutionRequest getLastStartQueryExecutionRequest() {
+        return lastStartQueryExecutionRequest;
+    }
 
     /**
      * Optionally provide a FIFO queue of results in the order they should be 
returned for each call to
@@ -104,6 +113,7 @@ public class AmazonAthenaClientMock implements AthenaClient 
{
     @Override
     public StartQueryExecutionResponse 
startQueryExecution(StartQueryExecutionRequest startQueryExecutionRequest)
             throws SdkException {
+        lastStartQueryExecutionRequest = startQueryExecutionRequest;
         String defaultResult = "11111111-1111-1111-1111-111111111111";
         String result = startQueryExecutionResults.isEmpty() ? defaultResult : 
startQueryExecutionResults.poll();
 
diff --git 
a/components/camel-aws/camel-aws2-athena/src/test/java/org/apache/camel/component/aws2/athena/Athena2ProducerQueryStringTest.java
 
b/components/camel-aws/camel-aws2-athena/src/test/java/org/apache/camel/component/aws2/athena/Athena2ProducerQueryStringTest.java
new file mode 100644
index 000000000000..556a3fac4644
--- /dev/null
+++ 
b/components/camel-aws/camel-aws2-athena/src/test/java/org/apache/camel/component/aws2/athena/Athena2ProducerQueryStringTest.java
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws2.athena;
+
+import org.apache.camel.BindToRegistry;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.support.DefaultExchange;
+import org.apache.camel.test.junit6.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import software.amazon.awssdk.services.athena.model.GetQueryExecutionResponse;
+import software.amazon.awssdk.services.athena.model.StartQueryExecutionRequest;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+/**
+ * Where the startQueryExecution operation takes the SQL from: the header, 
then the queryString option, and the message
+ * body only when neither is set.
+ */
+public class Athena2ProducerQueryStringTest extends CamelTestSupport {
+
+    private static final String ATHENA = 
"aws2-athena://label?outputLocation=s3://bucket/path/";
+
+    @BindToRegistry("amazonAthenaClient")
+    private final AmazonAthenaClientMock client = new AmazonAthenaClientMock();
+
+    @Test
+    public void startQueryExecutionRunsQueryStringOptionWhenBodyIsSet() {
+        Exchange exchange = template.send(ATHENA + "&queryString=RAW(SELECT 
1)",
+                e -> e.getIn().setBody("Hello World"));
+
+        assertNull(exchange.getException());
+        assertEquals("SELECT 1", lastQuery());
+    }
+
+    @Test
+    public void startQueryExecutionHeaderOverridesQueryStringOption() {
+        Exchange exchange = template.send(ATHENA + "&queryString=RAW(SELECT 
1)", e -> {
+            e.getIn().setHeader(Athena2Constants.QUERY_STRING, "SELECT 2");
+            e.getIn().setBody("Hello World");
+        });
+
+        assertNull(exchange.getException());
+        assertEquals("SELECT 2", lastQuery());
+    }
+
+    @Test
+    public void startQueryExecutionHeaderOverridesBody() {
+        Exchange exchange = template.send(ATHENA, e -> {
+            e.getIn().setHeader(Athena2Constants.QUERY_STRING, "SELECT 2");
+            e.getIn().setBody("SELECT 3");
+        });
+
+        assertNull(exchange.getException());
+        assertEquals("SELECT 2", lastQuery());
+    }
+
+    @Test
+    public void startQueryExecutionUsesBodyWithoutHeaderAndQueryString() {
+        Exchange exchange = template.send(ATHENA, e -> 
e.getIn().setBody("SELECT 3"));
+
+        assertNull(exchange.getException());
+        assertEquals("SELECT 3", lastQuery());
+    }
+
+    @Test
+    public void startQueryExecutionWithoutQueryFails() {
+        Exchange exchange = template.send(ATHENA, e -> 
e.getIn().setBody(null));
+
+        IllegalArgumentException cause = 
assertInstanceOf(IllegalArgumentException.class, exchange.getException());
+        assertTrue(cause.getMessage().contains(Athena2Constants.QUERY_STRING), 
cause.getMessage());
+        assertNull(client.getLastStartQueryExecutionRequest());
+    }
+
+    @Test
+    public void startQueryExecutionDoesNotSendResponseOfEarlierStepAsQuery() 
throws Exception {
+        MockEndpoint between = getMockEndpoint("mock:between");
+        between.expectedMessageCount(1);
+        
between.message(0).body().isInstanceOf(GetQueryExecutionResponse.class);
+
+        Exchange exchange = template.send("direct:twoQueries", e -> 
e.getIn().setBody("Hello World"));
+
+        between.assertIsSatisfied();
+        assertNull(exchange.getException());
+        assertEquals("SELECT 2", lastQuery());
+    }
+
+    @Test
+    public void includeTraceSanitizesFromEndpointUri() {
+        // the producer template creates the exchange from the endpoint it 
sends to, so that is the from endpoint
+        Exchange exchange = template.send(ATHENA + 
"&includeTrace=true&accessKey=myAccessKey&secretKey=mySecretKey"
+                                          + "&queryString=RAW(SELECT 1)",
+                e -> e.getIn().setBody("Hello World"));
+
+        assertNull(exchange.getException());
+        String query = lastQuery();
+        assertTrue(query.startsWith("-- {\"fromEndpointUri\": 
\"aws2-athena://label?"), query);
+        assertTrue(query.contains("accessKey=xxxxxx"), query);
+        assertTrue(query.contains("secretKey=xxxxxx"), query);
+        assertFalse(query.contains("myAccessKey"), query);
+        assertFalse(query.contains("mySecretKey"), query);
+        assertTrue(query.endsWith("\nSELECT 1"), query);
+    }
+
+    @Test
+    public void includeTraceWithoutFromEndpoint() {
+        Exchange exchange = new DefaultExchange(context);
+        exchange.getIn().setHeader(Athena2Constants.QUERY_STRING, "SELECT 1");
+
+        Exchange out = template.send(ATHENA + "&includeTrace=true", exchange);
+
+        assertNull(out.getException());
+        String query = lastQuery();
+        assertTrue(query.startsWith("-- {\"exchangeId\": \"" + 
exchange.getExchangeId() + "\""), query);
+        assertTrue(query.endsWith("\nSELECT 1"), query);
+    }
+
+    private String lastQuery() {
+        StartQueryExecutionRequest request = 
client.getLastStartQueryExecutionRequest();
+        assertNotNull(request, "startQueryExecution was not called");
+        return request.queryString();
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            @Override
+            public void configure() {
+                // the first query waits for its completion, which leaves its 
response as the message body
+                from("direct:twoQueries")
+                        .to(ATHENA + "&queryString=RAW(SELECT 
1)&waitTimeout=60000&initialDelay=1")
+                        .to("mock:between")
+                        .to(ATHENA + "&queryString=RAW(SELECT 2)");
+            }
+        };
+    }
+}
diff --git 
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
index 800afc909c3f..0b6c386f05e1 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc
@@ -26,6 +26,21 @@ scheduled time of its window, but before the (late) timer 
has run, joins that wi
 checkpointed by that timer. Before, such an event always started a new window, 
so `timeout` was practically never
 set. Routes that read this header can now see `timeout` as well as `size`.
 
+=== camel-aws2-athena - the queryString option takes precedence over the 
message body
+
+The `startQueryExecution` operation of the `aws2-athena` producer, which is 
its default operation, now takes the SQL to
+run from the `CamelAwsAthenaQueryString` header, then from the `queryString` 
option, and from the message body only
+when neither the header nor the option is set. Previously the message body 
came first, so an endpoint configured with
+`queryString` used the message body as the SQL whenever the message had one.
+
+Routes that set the SQL in the message body and configure no `queryString` 
option, as the examples in the component
+documentation do, keep working. Routes that set both now run the `queryString` 
option; remove the option, or set the
+SQL in the `CamelAwsAthenaQueryString` header, to keep running the SQL of the 
message body.
+
+With `includeTrace=true`, the URI of the from endpoint in the SQL comment is 
now sanitized, as Camel does when it logs
+an endpoint URI, and it is left out when the exchange has no from endpoint, 
which failed with a `NullPointerException`
+before.
+
 == Upgrading from 4.22.1 to 4.22.2
 
 === camel-management - Route group exchange counters count once per entry into 
the group again
diff --git 
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2AthenaComponentBuilderFactory.java
 
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2AthenaComponentBuilderFactory.java
index 2b475ba83409..23e16ef1ce03 100644
--- 
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2AthenaComponentBuilderFactory.java
+++ 
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2AthenaComponentBuilderFactory.java
@@ -287,10 +287,11 @@ public interface Aws2AthenaComponentBuilderFactory {
         }
     
         /**
-         * The SQL query to run. Except for simple queries, prefer setting this
-         * as the body of the Exchange or as a header using
-         * Athena2Constants.QUERY_STRING to avoid having to deal with URL
-         * encoding issues.
+         * The SQL query to run. The CamelAwsAthenaQueryString header takes
+         * precedence over this option, and the message body is used as the
+         * query only when neither the header nor this option is set. Except 
for
+         * simple queries, prefer setting the query in the header or as the 
body
+         * of the Exchange to avoid having to deal with URL encoding issues.
          * 
          * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
          * 
diff --git 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Athena2EndpointBuilderFactory.java
 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Athena2EndpointBuilderFactory.java
index f292dda6c172..eec95fdabeea 100644
--- 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Athena2EndpointBuilderFactory.java
+++ 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Athena2EndpointBuilderFactory.java
@@ -347,10 +347,11 @@ public interface Athena2EndpointBuilderFactory {
             return this;
         }
         /**
-         * The SQL query to run. Except for simple queries, prefer setting this
-         * as the body of the Exchange or as a header using
-         * Athena2Constants.QUERY_STRING to avoid having to deal with URL
-         * encoding issues.
+         * The SQL query to run. The CamelAwsAthenaQueryString header takes
+         * precedence over this option, and the message body is used as the
+         * query only when neither the header nor this option is set. Except 
for
+         * simple queries, prefer setting the query in the header or as the 
body
+         * of the Exchange to avoid having to deal with URL encoding issues.
          * 
          * The option is a: <code>java.lang.String</code> type.
          * 
@@ -1179,9 +1180,10 @@ public interface Athena2EndpointBuilderFactory {
             return "CamelAwsAthenaClientRequestToken";
         }
         /**
-         * The SQL query to run. Except for simple queries, prefer setting this
-         * as the body of the Exchange or as this header to avoid having to 
deal
-         * with URL encoding issues.
+         * The SQL query to run. It takes precedence over the queryString 
option
+         * and the message body. Except for simple queries, prefer setting the
+         * query in this header or as the body of the Exchange to avoid having
+         * to deal with URL encoding issues.
          * 
          * The option is a: {@code String} type.
          * 

Reply via email to