<@ULVA73B9P> what sort of data is stored in these ...
# ask-marvin
e
@Marvin what sort of data is stored in these postgres tables by prefect? events event_resources task_run_state flow_run_state
m
thought for 85.4 seconds
Here's what these tables store in Prefect's PostgreSQL database: 1. events - Stores system-wide notifications about state changes and significant actions - Used for logging, monitoring, and automation purposes - Contains information like: - Event timestamp - Event name/type - Primary resource affected - Additional metadata about the event 2. event_resources - Links events to specific resources in the system - Helps track what resources are affected by each event - Enables resource-specific event querying and tracking 3. flow_run_state - Records the state history of flow runs - Captures every state transition a flow goes through - Includes data like: - State type (Running, Completed, Failed, etc.) - Timestamps for state changes - Messages associated with state transitions - Any relevant state data 4. task_run_state - Similar to flow_run_state but for individual tasks - Tracks the execution history of tasks - Contains: - Task state information - State transition timestamps - Success/failure details - Messages related to state changes These tables are crucial for: - Maintaining execution history - Enabling observability of your workflows - Supporting the event system that powers automations and notifications - Providing data for the Prefect UI You can view this data through the Prefect UI, which provides a more user-friendly interface to explore the execution history and states of your flows and tasks. The UI is available at
<http://127.0.0.1:4200>
when running Prefect server locally. For more information about Prefect's server architecture and how this data is used, you can refer to the server documentation.