<@ULVA73B9P> in prefect 2.x hosted. in the databas...
# ask-marvin
s
@Marvin in prefect 2.x hosted. in the database how should i be able to identify the parent flow run for a given sub flow run
m
In Prefect 2.x, a subflow run is created when a flow function is called within the execution of another flow. The primary flow acts as the "parent" flow, and the flow created within it is the "child" or "subflow." To identify the parent flow run for a given subflow run in the database, you would typically look for a reference to the parent flow run ID within the metadata of the subflow run. This relationship is maintained in the backend, allowing the subflow to be represented as if it had been called separately. For more detailed information, you can refer to the Prefect 2.x documentation on composing flows.
s
@Marvin so is it the "parent_task_run_id"
m
The Prefect 2.x documentation does not explicitly mention the term "parent_task_run_id" in relation to identifying the parent flow run for a subflow run. However, in practice, the concept of a parent flow run is typically associated with metadata that links the subflow run to its parent. To confirm whether "parent_task_run_id" is used in your specific database schema, you might need to check the database structure or any custom configurations you have. The documentation primarily discusses subflow runs as separate entities with full backend representation. For more detailed exploration, you may want to refer to the Prefect 2.x documentation on flows.