vincbeck commented on code in PR #48120: URL: https://github.com/apache/airflow/pull/48120#discussion_r2033107268
########## providers/amazon/tests/system/amazon/aws/example_exasol_to_s3.py: ########## @@ -0,0 +1,93 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +""" +Example DAG to test Exasol connection and S3 upload in Apache Airflow. + +This DAG uses the ExasolToS3Operator to execute a simple SQL query on Exasol and +upload the result file to S3. It verifies that both the Exasol connection (`exasol_default`) +and S3 credential settings (`aws_default`) are working correctly. +""" +from __future__ import annotations + +from datetime import datetime + +from airflow.models.baseoperator import chain +from airflow import DAG +from airflow.providers.amazon.aws.operators.s3 import S3CreateBucketOperator, S3DeleteBucketOperator +from airflow.providers.amazon.aws.transfers.exasol_to_s3 import ExasolToS3Operator +from airflow.utils.trigger_rule import TriggerRule +from system.amazon.aws.utils import SystemTestContextBuilder + +sys_test_context_task = SystemTestContextBuilder().build() + +DAG_ID = "example_exasol_to_s3" + +with DAG( + dag_id=DAG_ID, + start_date=datetime(2025, 3, 11), + schedule="@once", + catchup=False, + tags=["exasol", "s3", "test"], +) as dag: + + test_context = sys_test_context_task() + env_id = test_context["ENV_ID"] + s3_bucket_name = f"{env_id}-bucket" + s3_key = f"{env_id}/files/exasol-output.csv" + + create_s3_bucket = S3CreateBucketOperator( + task_id="create_s3_bucket", + bucket_name=s3_bucket_name, + ) + + # [START howto_transfer_exasol_to_s3] + exasol_to_s3 = ExasolToS3Operator( Review Comment: Let's do it step by step, first can you fix the tests please? Then I'll help you to figure out the doc URL. The reason why I want to fix the tests first is, there is a breeze command to build the doc `breeze build-docs`, then from that you can preview the doc and thus, having the URL. But it seems the doc fails to build (among other tests). So let's fix that first :) -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org