airflow.providers.snowflake.operators.snowpark
¶
Module Contents¶
Classes¶
Executes a Python function with Snowpark Python code. |
- class airflow.providers.snowflake.operators.snowpark.SnowparkOperator(*, snowflake_conn_id='snowflake_default', python_callable, op_args=None, op_kwargs=None, templates_dict=None, templates_exts=None, show_return_value_in_logs=True, warehouse=None, database=None, schema=None, role=None, authenticator=None, session_parameters=None, **kwargs)[source]¶
Bases:
airflow.providers.common.compat.standard.operators.PythonOperator
Executes a Python function with Snowpark Python code.
See also
For more information on how to use this operator, take a look at the guide: SnowparkOperator
- Parameters
snowflake_conn_id (str) – Reference to Snowflake connection id
python_callable (Callable) – A reference to an object that is callable
op_args (Collection[Any] | None) – a list of positional arguments that will get unpacked when calling your callable
op_kwargs (Mapping[str, Any] | None) – a dictionary of keyword arguments that will get unpacked in your function
templates_dict (dict[str, Any] | None) – a dictionary where the values are templates that will get templated by the Airflow engine sometime between
__init__
andexecute
takes place and are made available in your callable’s context after the template has been applied. (templated)templates_exts (Sequence[str] | None) – a list of file extensions to resolve while processing templated fields, for examples
['.sql', '.hql']
show_return_value_in_logs (bool) – a bool value whether to show return_value logs. Defaults to True, which allows return value log output. It can be set to False to prevent log output of return value when you return huge data such as transmission a large amount of XCom to TaskAPI.
warehouse (str | None) – name of warehouse (will overwrite any warehouse defined in the connection’s extra JSON)
database (str | None) – name of database (will overwrite database defined in connection)
schema (str | None) – name of schema (will overwrite schema defined in connection)
role (str | None) – name of role (will overwrite any role defined in connection’s extra JSON)
authenticator (str | None) – 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.
session_parameters (dict | None) – You can set session-level parameters at the time you connect to Snowflake