delete_dag_dataset_queued_events
Remove queued Dataset events for a specific DAG to manage event backlog and maintain system performance in Apache Airflow.
Instructions
Delete queued Dataset events for a DAG
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dag_id | Yes | ||
| before | No |
Implementation Reference
- src/airflow/dataset.py:143-152 (handler)The main handler function that executes the tool logic. It takes a dag_id and optional 'before' timestamp, calls the dataset_api to delete queued events, and returns the response.async def delete_dag_dataset_queued_events( dag_id: str, before: Optional[str] = None, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: kwargs: Dict[str, Any] = {} if before is not None: kwargs["before"] = before response = dataset_api.delete_dag_dataset_queued_events(dag_id=dag_id, **kwargs) return [types.TextContent(type="text", text=str(response.to_dict()))]
- src/airflow/dataset.py:26-31 (registration)The registration tuple in get_all_functions() that registers the tool with its handler function, name, description, and indicates it is not read-only (mutates data).( delete_dag_dataset_queued_events, "delete_dag_dataset_queued_events", "Delete queued Dataset events for a DAG", False, ),