Bruno Murino
07/09/2021, 12:45 PMZach Angell
import prefect
from prefect.client import Client
# get the task run id from context
task_run_id = prefect.context.get("task_run_id")
# query for the name
query = """
query {task_run_by_pk (id: <task_run_id>) {
name
}}
"""
Client().graphql(query)
Bruno Murino
07/09/2021, 1:33 PM