Snowflake agent#

Note

To use the Snowflake agent, you must pip install flytekitplugins-snowflake.

class flytekitplugins.snowflake.SnowflakeConfig(user, account, database, schema, warehouse)#

SnowflakeConfig should be used to configure a Snowflake Task. You can use the query below to retrieve all metadata for this config.

SELECT

CURRENT_USER() AS “User”, CONCAT(CURRENT_ORGANIZATION_NAME(), ‘-’, CURRENT_ACCOUNT_NAME()) AS “Account”, CURRENT_DATABASE() AS “Database”, CURRENT_SCHEMA() AS “Schema”, CURRENT_WAREHOUSE() AS “Warehouse”;

Parameters:
  • user (str)

  • account (str)

  • database (str)

  • schema (str)

  • warehouse (str)

class flytekitplugins.snowflake.SnowflakeTask(*args, **kwargs)#

This is the simplest form of a Snowflake Task, that can be used even for tasks that do not produce any output.

get_config(settings)#

Returns the task config as a serializable dictionary. This task config consists of metadata about the custom defined for this task.

Parameters:

settings (SerializationSettings)

Return type:

Dict[str, str]

get_sql(settings)#

Returns the Sql definition (if any) that is used to run the task on hosted Flyte.

Parameters:

settings (SerializationSettings)

Return type:

Sql | None