Skip to content

Inject Execution context metadata into a Python script #4

Description

@anna-geller

We can make the execution context metadata available through a context object.

Example:

import pandas as pd
from kestra import context

mylabels = context.labels
myinputs = context.inputs
myvars = context.vars
start_date = context.trigger.startDate
csv_path = context.outputs.prev_task.uri # outputs from previous tasks

df = pd.read_csv("csv_path")

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/pluginPlugin-related issue or feature requestkind/cooldownGreat candidate for the cooldown periodkind/customer-requestRequested by one or more customers

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions