Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-6761

Wrong "Workgroup" param in aws_athena_hook.py

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.10.8, 1.10.9
    • Fix Version/s: 1.10.10
    • Component/s: hooks
    • Labels:
      None

      Description

      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

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                duyet Van-Duyet Le
                Reporter:
                duyet Van-Duyet Le
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: