flolas commented on issue #36948: URL: https://github.com/apache/airflow/issues/36948#issuecomment-1908966335
Tested https://github.com/apache/airflow/issues/36948#:~:text=Implement%20AthenaSQLHook%20(%2336171). Work as expected. Env: Amazon MWAA [v2.7.2](https://pypi.python.org/pypi/apache-airflow/2.7.2) Instance. Steps: (1) Started a fresh MWAA instance (2) Added to requirements [amazon: 8.17.0rc1](https://pypi.org/project/apache-airflow-providers-amazon/8.17.0rc1), also bump constrains: ```bash apache-airflow-providers-amazon==8.17.0rc1 boto3==1.33.0 botocore==1.33.0 s3transfer==0.8.0 redshift_connector==2.0.918 ``` (3) Created connection `athena_default` with extras ```json { "work_group": "primary", "region_name": "us-east-1" } ``` (4) Created connection `athena_assumed_role` with extras ```json { "work_group": "primary", "region_name": "us-east-1", "role_arn": "arn:aws:iam::xxxxxxxxx:role/athena-access" } ``` (5) Test DAG ```python create_sql_table1 = SQLExecuteQueryOperator( task_id="create_sql_table", conn_id='athena_default', sql='SELECT 1;SELECT 2;SELECT 3;SELECT 4', split_statements=True, dag=dag, ) create_sql_table2 = SQLExecuteQueryOperator( task_id="create_sql_table", conn_id='athena_assumed_role', sql='SELECT 1;SELECT 2;SELECT 3;SELECT 4', split_statements=True, dag=dag, ) create_sql_table1 >> create_sql_table2 ``` -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
