hi team, is it possible to access DAG information ...
# ask-the-community
m
hi team, is it possible to access DAG information from a task at runtime?
or to access workflow DAG information locally?
y
not really… what are you looking to do?
i mean your task can always query the control plane, hit the getworkflow endpoint of admin.
but i suspect that’s not what you’re asking.
m
i want to access and use the DAG information ideally at registration time
Copy code
i mean your task can always query the control plane, hit the getworkflow endpoint of admin.
how do i do this?
y
at registration time?
can you explain what you’re trying to do?
at registration time, the flytekit sdk should already have all the information about the dag (it doesn’t fetch reference things though)
m
i want to send DAG information (relationship between steps) to another service for tracking. currently without flyte, all my steps has a base class so at compile time i construct a graph with information about the relationship between steps. When it’s migrated to flyte, i no longer use a base class and steps are reference workflows now. what’s the best way to send the DAG information?
would i be able to create a workflow decorator (flyte doc) to get the dag information at compile time, and create a node that sends the tracking information?
k
The dag information is available in a standardized format from control plane endpoint
You can say get workflow and it will return a full closure
m
could you point me to reference on how to query the control plane? would flyteContextManager be able to access this information?
k
Flyteremote.fetch_workfloe
m
what if i want to have a task that have access to the DAG information? would that be possible?
k
Wdym?
In python you have the workflow
You can load it call translate and it will give you the protobuf rep
Or there are nodes with upstream And downstream
m
You can load it call translate and it will give you the protobuf rep
how do i do this? or have information about other nodes’ upstream and downstream in a task?
k
AFK, I I’ll share when near a laptop
m
thank you!