te-horie commented on issue #70355:
URL: https://github.com/apache/airflow/issues/70355#issuecomment-5070779079

   Verified `apache-airflow-providers-amazon 9.33.0rc1` for #69846
   
   - Environment: Airflow 3.1.3, Python 3.11.15, Breeze
   - Confirmed that `AthenaOperator` was loaded from the installed RC package 
in `site-packages`
   - Locally removed the `database` argument from the `read_table` task in 
[`example_athena.py`](https://github.com/apache/airflow/blob/2f7f70ba95eb8d047f2fd6f3c98eadff44c835a4/providers/amazon/tests/system/amazon/aws/example_athena.py)
   - Ran `pytest --system 
providers/amazon/tests/system/amazon/aws/example_athena.py`: **PASS**
   - Confirmed that the Athena query succeeded with only `Catalog` in 
`QueryExecutionContext`
   
   **Final Result: PASS**👍
   
   <details><summary>Details</summary>
   <p>
   
   **Preparation**
   Locally removed the `database` argument from the `read_table` task in 
[`example_athena.py`](https://github.com/apache/airflow/blob/2f7f70ba95eb8d047f2fd6f3c98eadff44c835a4/providers/amazon/tests/system/amazon/aws/example_athena.py)
   ```diff
   diff --git a/providers/amazon/tests/system/amazon/aws/example_athena.py 
b/providers/amazon/tests/system/amazon/aws/example_athena.py
   index 36a37a8e1c..3c72e9b309 100644
   --- a/providers/amazon/tests/system/amazon/aws/example_athena.py
   +++ b/providers/amazon/tests/system/amazon/aws/example_athena.py
   @@ -129,7 +129,6 @@ with DAG(
        read_table = AthenaOperator(
            task_id="read_table",
            query=query_read_table,
   -        database=athena_database,
            output_location=f"s3://{s3_bucket}/",
        )
        # [END howto_operator_athena]
   ```
   
   **Setup**
   ```
   $ breeze shell --use-airflow-version 3.1.3 --mount-sources tests --python 
3.11 --backend postgres --forward-credentials
   Using constraints for 3.1.3 - exact version specified.
   ...
   [Breeze:3.11.15] root@53d1cf05c6f2:/opt/airflow$ pip install 
"apache-airflow-providers-amazon==9.33.0rc1"
   ...
   Successfully installed apache-airflow-providers-amazon-9.33.0rc1 ...
   [Breeze:3.11.15] root@53d1cf05c6f2:/opt/airflow$ pip show 
apache-airflow-providers-amazon
   Name: apache-airflow-providers-amazon
   Version: 9.33.0rc1
   ...
   Location: /usr/python/lib/python3.11/site-packages
   ...
   [Breeze:3.11.15] root@53d1cf05c6f2:/opt/airflow$ python -c 'import 
airflow.providers.amazon.aws.operators.athena as m; print(m.__file__)'
   
/usr/python/lib/python3.11/site-packages/airflow/providers/amazon/aws/operators/athena.py
   [Breeze:3.11.15] root@53d1cf05c6f2:/opt/airflow$ grep -F 'database: str | 
None = None,' 
/usr/python/lib/python3.11/site-packages/airflow/providers/amazon/aws/operators/athena.py
           database: str | None = None,
   ```
   
   **System test execution**
   ```
   [Breeze:3.11.15] root@53d1cf05c6f2:/opt/airflow$ env 
SYSTEM_TESTS_ENV_ID=airflowtest$(date +%s) AWS_PROFILE=airflow-test pytest 
--system providers/amazon/tests/system/amazon/aws/example_athena.py
   ...
   providers/amazon/tests/system/amazon/aws/example_athena.py::test_run <- 
../../usr/python/lib/python3.11/site-packages/tests_common/test_utils/system_tests.py
 PASSED [100%]
   ...
   ```
   
   **Athena query verification**
   ```
   $ aws athena get-query-execution --query-execution-id <<<REDACTED>>> 
--profile airflow-test
   QueryExecution:
     ...
     Query: SELECT * from 
airflowtest1784900779_default.airflowtest1784900779_test_table
     QueryExecutionContext:
       Catalog: awsdatacatalog
     QueryExecutionId: <<<REDACTED>>>
     ...
     Status:
       CompletionDateTime: '2026-07-24T22:46:51.651000+09:00'
       State: SUCCEEDED
       SubmissionDateTime: '2026-07-24T22:46:51.061000+09:00'
     ...
   ```
   
   </p>
   </details> 
   
   ---
   
   Drafted-by: OpenAI Codex (GPT-5.6); reviewed by @te-horie before posting


-- 
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]

Reply via email to