flytekitplugins.snowflake.SnowflakeAgent#

class flytekitplugins.snowflake.SnowflakeAgent[source]#

Methods

async async_create(context, output_prefix, task_template, inputs=None)[source]#

Return a Unique ID for the task that was created. It should return error code if the task creation failed.

Parameters
  • context (grpc.ServicerContext) –

  • output_prefix (str) –

  • task_template (flytekit.models.task.TaskTemplate) –

  • inputs (Optional[flytekit.models.literals.LiteralMap]) –

Return type

flyteidl.admin.agent_pb2.CreateTaskResponse

async async_delete(context, resource_meta)[source]#

Delete the task. This call should be idempotent.

Parameters
  • context (grpc.ServicerContext) –

  • resource_meta (bytes) –

Return type

flyteidl.admin.agent_pb2.DeleteTaskResponse

async async_get(context, resource_meta)[source]#

Return the status of the task, and return the outputs in some cases. For example, bigquery job can’t write the structured dataset to the output location, so it returns the output literals to the propeller, and the propeller will write the structured dataset to the blob store.

Parameters
  • context (grpc.ServicerContext) –

  • resource_meta (bytes) –

Return type

flyteidl.admin.agent_pb2.GetTaskResponse

create(context, output_prefix, task_template, inputs=None)#

Return a Unique ID for the task that was created. It should return error code if the task creation failed.

Parameters
  • context (grpc.ServicerContext) –

  • output_prefix (str) –

  • task_template (flyteidl.core.tasks_pb2.TaskTemplate) –

  • inputs (Optional[flytekit.models.literals.LiteralMap]) –

Return type

flyteidl.admin.agent_pb2.CreateTaskResponse

delete(context, resource_meta)#

Delete the task. This call should be idempotent.

Parameters
  • context (grpc.ServicerContext) –

  • resource_meta (bytes) –

Return type

flyteidl.admin.agent_pb2.DeleteTaskResponse

get(context, resource_meta)#
Parameters
  • context (grpc.ServicerContext) –

  • resource_meta (bytes) –

Return type

flyteidl.admin.agent_pb2.GetTaskResponse

get_connection(metadata)[source]#
Parameters

metadata (flytekitplugins.snowflake.agent.Metadata) –

Return type

<module ‘snowflake.connector’ from ‘/home/docs/checkouts/readthedocs.org/user_builds/flyte-next/conda/latest/lib/python3.9/site-packages/snowflake/connector/__init__.py’>

get_private_key()[source]#

Attributes

asynchronous

asynchronous is a flag to indicate whether the agent is asynchronous or not.

task_type

task_type is the name of the task type that this agent supports.