- class flytekit.ExecutionParameters(execution_date, tmp_dir, stats, execution_id, logging, **kwargs)¶
This is a run-time user-centric context object that is accessible to every @task method. It can be accessed using
This object provides the following * a statsd handler * a logging handler * the execution ID as an
flytekit.models.core.identifier.WorkflowExecutionIdentifierobject * a working directory for the user to write arbitrary files to
Please do not confuse this object with the
execution_date – Date when the execution is running
tmp_dir – temporary directory for the execution
stats – handle to emit stats
execution_id – Identifier for the xecution
logging – handle to logging
- Return type
Returns task specific context if present else raise an error. The returned context will match the key
key (str) –
- Return type
This is a datetime representing the time at which a workflow was started. This is consistent across all tasks executed in a workflow or sub-workflow.
Do NOT use this execution_date to drive any production logic. It might be useful as a tag for data to help in debugging.
This is the identifier of the workflow execution within the underlying engine. It will be consistent across all task executions in a workflow or sub-workflow execution.
Do NOT use this execution_id to drive any production logic. This execution ID should only be used as a tag on output data to link back to the workflow run that created it.
A handle to a useful logging object. TODO: Usage examples
A handle to a special statsd object that provides usefully tagged stats. TODO: Usage examples and better comments
A handle to a special working directory for easily producing temporary files.
TODO: Usage examples TODO: This does not always return a AutoDeletingTempDir