<@ULVA73B9P> is there any way to access the files ...
# ask-marvin
m
@Marvin is there any way to access the files in a docker container from a completed flow run that ran on a local docker work pool? I've tried searching for a container with the same name as the subflow run that I'm interested in, but couldn't see anything. Does Prefect automatically purge/clean up containers after a run? Specifically, I'm looking to find a "run_results.json" file produced by a dbt subflow. Would the best way to find these things going forward be to save them as an Artifact? If yes, what's easiest way to accomplish that?
n
well see what marvin says but yeah theres a bool on the work pool: to delete container after / not
👍 1
m
Prefect typically uses ephemeral infrastructure for flow runs, and when using Docker as part of the local work pool, the Docker containers are ephemeral as well. The containers used for flow runs are likely cleaned up after the run completes, which would explain why you are unable to find the container after the flow run. Regarding accessing the "run_results.json" file from a dbt subflow, the best practice would be to save such output files as artifacts. Artifacts in Prefect are persisted outputs such as tables, Markdown, or links, and are stored on Prefect Cloud or a Prefect server instance. By publishing the file as an artifact, you can easily manage and share the information with your team and track the file over multiple flow runs. Unfortunately, the excerpts did not directly address the process of saving a file as an artifact from a dbt subflow. However, typically this would involve using a task within the flow to explicitly upload the file as an artifact, possibly through a Prefect task that is designed for artifacts handling. Links to documentation: - Docker Guide - Workers Tutorial - Artifacts Concept - Prefect + dbt Integration For specific instructions on how to save the "run_results.json" file as an artifact, you may need to look into more detailed steps in the Prefect documentation or reach out to the community for examples of best practices when working with dbt subflows and artifacts.