shaikshakeel commented on a change in pull request #6469: [AIRFLOW-5816] S3 to snowflake operator URL: https://github.com/apache/airflow/pull/6469#discussion_r364125998
########## File path: airflow/providers/snowflake/operators/snowflake.py ########## @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +# +# 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 airflow.models import BaseOperator +from airflow.providers.snowflake.hooks.snowflake import SnowflakeHook +from airflow.utils.decorators import apply_defaults + + +class SnowflakeOperator(BaseOperator): + """ + Executes sql code in a Snowflake database + + :param snowflake_conn_id: reference to specific snowflake connection id + :type snowflake_conn_id: str + :param sql: the sql code to be executed. (templated) + :type sql: Can receive a str representing a sql statement, + a list of str (sql statements), or reference to a template file. + Template reference are recognized by str ending in '.sql' + :param warehouse: name of warehouse (will overwrite any warehouse + defined in the connection's extra JSON) + :type warehouse: str + :param database: name of database (will overwrite database defined + in connection) + :type database: str + :param schema: name of schema (will overwrite schema defined in + connection) + :type schema: str + :param role: name of role (will overwrite any role defined in + connection's extra JSON) Review comment: 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
