Skip to content

Commit

Permalink
[AIRFLOW-6767] Correct name for default Athena workgroup (#7394)
Browse files Browse the repository at this point in the history
cherry-picked from b7aa778
  • Loading branch information
bhavika authored and kaxil committed Mar 19, 2020
1 parent 05e43c8 commit e80ad22
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions airflow/contrib/hooks/aws_athena_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def get_conn(self):
return self.conn

def run_query(self, query, query_context, result_configuration, client_request_token=None,
workgroup='default'):
workgroup='primary'):
"""
Run Presto query on athena with provided config and return submitted query_execution_id
Expand All @@ -66,7 +66,7 @@ def run_query(self, query, query_context, result_configuration, client_request_t
:type result_configuration: dict
:param client_request_token: Unique token created by user to avoid multiple executions of same query
:type client_request_token: str
:param workgroup: Athena workgroup name, when not specified, will be 'default'
:param workgroup: Athena workgroup name, when not specified, will be 'primary'
:type workgroup: str
:return: str
"""
Expand Down
2 changes: 1 addition & 1 deletion airflow/contrib/operators/aws_athena_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class AWSAthenaOperator(BaseOperator):
@apply_defaults
def __init__(self, query, database, output_location, aws_conn_id='aws_default', client_request_token=None,
query_execution_context=None, result_configuration=None, sleep_time=30, max_tries=None,
workgroup='default',
workgroup='primary',
*args, **kwargs):
super(AWSAthenaOperator, self).__init__(*args, **kwargs)
self.query = query
Expand Down
2 changes: 1 addition & 1 deletion tests/contrib/operators/test_aws_athena_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
'database': 'TEST_DATABASE',
'outputLocation': 's3://test_s3_bucket/',
'client_request_token': 'eac427d0-1c6d-4dfb-96aa-2835d3ac6595',
'workgroup': 'default'
'workgroup': 'primary'
}

query_context = {
Expand Down

0 comments on commit e80ad22

Please sign in to comment.