[
https://issues.apache.org/jira/browse/AIRFLOW-6761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17033189#comment-17033189
]
ASF GitHub Bot commented on AIRFLOW-6761:
-----------------------------------------
duyetdev commented on pull request #7386: [AIRFLOW-6761] Fix WorkGroup param in
AWSAthenaHook
URL: https://github.com/apache/airflow/pull/7386
Maybe a typo error at run_query function in aws_athena_hook.py
```
Unknown parameter in input: "Workgroup", must be one of: QueryString,
ClientRequestToken, QueryExecutionContext, ResultConfiguration, WorkGroup
Traceback (most recent call last):
File
"/usr/local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line
966, in _run_raw_task
result = task_copy.execute(context=context)
File "/opt/airflow/dags/operators/athena_result_operator.py", line 14, in
execute
query_execution_id = super().execute(context)
File
"/usr/local/lib/python3.7/site-packages/airflow/contrib/operators/aws_athena_operator.py",
line 85, in execute
self.workgroup)
File
"/usr/local/lib/python3.7/site-packages/airflow/contrib/hooks/aws_athena_hook.py",
line 77, in run_query
Workgroup=workgroup)
File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line
276, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line
559, in _make_api_call
api_params, operation_model, context=request_context)
File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line
607, in _convert_to_request_dict
api_params, operation_model)
File "/usr/local/lib/python3.7/site-packages/botocore/validate.py", line
297, in serialize_to_request
raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Unknown parameter in input: "Workgroup", must be one of: QueryString,
ClientRequestToken, QueryExecutionContext, ResultConfiguration, WorkGroup
```
According to boto3's docs, it's should be WorkGroup
---
Issue link:
[AIRFLOW-6761](https://issues.apache.org/jira/browse/AIRFLOW-6761)
Make sure to mark the boxes below before creating PR: [x]
- [x] Description above provides context of the change
- [x] Commit message/PR title starts with `[AIRFLOW-NNNN]`. AIRFLOW-NNNN =
JIRA ID<sup>*</sup>
- [x] Unit tests coverage for changes (not needed for documentation changes)
- [x] Commits follow "[How to write a good git commit
message](http://chris.beams.io/posts/git-commit/)"
- [ ] Relevant documentation is updated including usage instructions.
- [x] I will engage committers as explained in [Contribution Workflow
Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
<sup>*</sup> For document-only changes commit message can start with
`[AIRFLOW-XXXX]`.
---
In case of fundamental code change, Airflow Improvement Proposal
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals))
is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party
License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in
[UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
Read the [Pull Request
Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)
for more information.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Wrong "Workgroup" param in aws_athena_hook.py
> ---------------------------------------------
>
> Key: AIRFLOW-6761
> URL: https://issues.apache.org/jira/browse/AIRFLOW-6761
> Project: Apache Airflow
> Issue Type: Bug
> Components: hooks
> Affects Versions: 1.10.8, 1.10.9
> Reporter: Van-Duyet Le
> Priority: Major
>
> Maybe a typo error at run_query function in aws_athena_hook.py
> {code:java}
> Unknown parameter in input: "Workgroup", must be one of: QueryString,
> ClientRequestToken, QueryExecutionContext, ResultConfiguration, WorkGroup
> Traceback (most recent call last):
> File
> "/usr/local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line
> 966, in _run_raw_task
> result = task_copy.execute(context=context)
> File "/opt/airflow/dags/operators/athena_result_operator.py", line 14, in
> execute
> query_execution_id = super().execute(context)
> File
> "/usr/local/lib/python3.7/site-packages/airflow/contrib/operators/aws_athena_operator.py",
> line 85, in execute
> self.workgroup)
> File
> "/usr/local/lib/python3.7/site-packages/airflow/contrib/hooks/aws_athena_hook.py",
> line 77, in run_query
> Workgroup=workgroup)
> File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 276,
> in _api_call
> return self._make_api_call(operation_name, kwargs)
> File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 559,
> in _make_api_call
> api_params, operation_model, context=request_context)
> File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 607,
> in _convert_to_request_dict
> api_params, operation_model)
> File "/usr/local/lib/python3.7/site-packages/botocore/validate.py", line
> 297, in serialize_to_request
> raise ParamValidationError(report=report.generate_report())
> botocore.exceptions.ParamValidationError: Parameter validation failed:
> Unknown parameter in input: "Workgroup", must be one of: QueryString,
> ClientRequestToken, QueryExecutionContext, ResultConfiguration, WorkGroup
> {code}
> According to [boto3's
> docs|https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/athena.html#Athena.Client.start_query_execution],
> it's should be {{WorkGroup}}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)