vincbeck commented on a change in pull request #19137:
URL: https://github.com/apache/airflow/pull/19137#discussion_r816187745



##########
File path: airflow/providers/amazon/aws/operators/redshift_data.py
##########
@@ -0,0 +1,151 @@
+#
+# 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.
+from time import sleep
+from typing import Optional
+
+from airflow.compat.functools import cached_property
+from airflow.exceptions import AirflowException
+from airflow.models import BaseOperator
+from airflow.providers.amazon.aws.hooks.redshift_data import RedshiftDataHook
+
+
+class RedshiftDataOperator(BaseOperator):
+    """
+    Executes SQL Statements against an Amazon Redshift cluster using Redshift 
Data
+
+    .. seealso::
+        For more information on how to use this operator, take a look at the 
guide:
+        :ref:`howto/operator:RedshiftDataOperator`
+
+    :param cluster_identifier: unique identifier of a cluster
+    :param database: the name of the database
+    :param sql: the SQL statement text to run
+    :param db_user: the database user name
+    :param parameters: the parameters for the SQL statement
+    :param secret_arn: the name or ARN of the secret that enables db access
+    :param statement_name: the name of the SQL statement
+    :param with_event: indicates whether to send an event to EventBridge
+    :param timeout: how long in seconds to wait for a response, if 0 don't wait
+    :param poll_interval: how often in seconds to check the query status
+    """
+
+    template_fields = (
+        'cluster_identifier',
+        'database',
+        'sql',
+        'db_user',
+        'parameters',
+    )
+    template_ext = ('.sql',)
+    template_fields_renderers = {'sql': 'sql'}
+
+    def __init__(
+        self,
+        database: str,
+        sql: str,
+        cluster_identifier: Optional[str] = "",

Review comment:
       Fair enough. Done




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