blob: 3e3b606d4b731b284918df9cc7b5d25412f33a05 [file] [log] [blame]
:py:mod:`airflow.providers.snowflake.transfers.s3_to_snowflake`
===============================================================
.. py:module:: airflow.providers.snowflake.transfers.s3_to_snowflake
.. autoapi-nested-parse::
This module contains AWS S3 to Snowflake operator.
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.providers.snowflake.transfers.s3_to_snowflake.S3ToSnowflakeOperator
.. py:class:: S3ToSnowflakeOperator(*, s3_keys = None, table, stage, prefix = None, file_format, schema = None, columns_array = None, warehouse = None, database = None, autocommit = True, snowflake_conn_id = 'snowflake_default', role = None, authenticator = None, session_parameters = None, **kwargs)
Bases: :py:obj:`airflow.models.BaseOperator`
Executes an COPY command to load files from s3 to Snowflake
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:S3ToSnowflakeOperator`
:param s3_keys: reference to a list of S3 keys
:param table: reference to a specific table in snowflake database
:param schema: name of schema (will overwrite schema defined in
connection)
:param stage: reference to a specific snowflake stage. If the stage's schema is not the same as the
table one, it must be specified
:param prefix: cloud storage location specified to limit the set of files to load
:param file_format: reference to a specific file format
:param warehouse: name of warehouse (will overwrite any warehouse
defined in the connection's extra JSON)
:param database: reference to a specific database in Snowflake connection
:param columns_array: reference to a specific columns array in snowflake database
:param snowflake_conn_id: Reference to
:ref:`Snowflake connection id<howto/connection:snowflake>`
:param role: name of role (will overwrite any role defined in
connection's extra JSON)
:param authenticator: authenticator for Snowflake.
'snowflake' (default) to use the internal Snowflake authenticator
'externalbrowser' to authenticate using your web browser and
Okta, ADFS or any other SAML 2.0-compliant identify provider
(IdP) that has been defined for your account
'https://<your_okta_account_name>.okta.com' to authenticate
through native Okta.
:param session_parameters: You can set session-level parameters at
the time you connect to Snowflake
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['s3_keys']
.. py:attribute:: template_fields_renderers
.. py:method:: execute(self, context)
This is the main method to derive when creating an operator.
Context is the same dictionary used as when rendering jinja templates.
Refer to get_template_context for more context.