| :py:mod:`airflow.providers.snowflake.transfers.copy_into_snowflake` |
| =================================================================== |
| |
| .. py:module:: airflow.providers.snowflake.transfers.copy_into_snowflake |
| |
| .. autoapi-nested-parse:: |
| |
| This module contains abstract operator that child classes implements |
| COPY INTO <TABLE> SQL in Snowflake |
| |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.snowflake.transfers.copy_into_snowflake.CopyFromExternalStageToSnowflakeOperator |
| |
| |
| |
| |
| .. py:class:: CopyFromExternalStageToSnowflakeOperator(*, files = None, table, stage, prefix = None, file_format, schema = None, columns_array = None, pattern = None, warehouse = None, database = None, autocommit = True, snowflake_conn_id = 'snowflake_default', role = None, authenticator = None, session_parameters = None, copy_options = None, validation_mode = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Executes a COPY INTO command to load files from an external stage from clouds to Snowflake |
| |
| This operator requires the snowflake_conn_id connection. The snowflake host, login, |
| and, password field must be setup in the connection. Other inputs can be defined |
| in the connection or hook instantiation. |
| |
| :param namespace: snowflake namespace |
| :param table: snowflake table |
| :param file_format: file format name i.e. CSV, AVRO, etc |
| :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 files: files to load into table |
| :param pattern: pattern to load files from external location to table |
| :param copy_into_postifx: optional sql postfix for INSERT INTO query |
| such as `formatTypeOptions` and `copyOptions` |
| :param snowflake_conn_id: Reference to :ref:`Snowflake connection id<howto/connection:snowflake>` |
| :param account: snowflake account name |
| :param warehouse: name of snowflake warehouse |
| :param database: name of snowflake database |
| :param region: name of snowflake region |
| :param role: name of snowflake role |
| :param schema: name of snowflake schema |
| :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 |
| :param copy_options: snowflake COPY INTO syntax copy options |
| :param validation_mode: snowflake COPY INTO syntax validation mode |
| |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['files'] |
| |
| |
| |
| .. py:attribute:: template_fields_renderers |
| |
| |
| |
| |
| .. py:method:: execute(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. |
| |
| |
| |