You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "amoghrajesh (via GitHub)" <gi...@apache.org> on 2026/06/03 06:06:47 UTC
Re: [PR] Record the writer info for every asset store write for better cross linkage [airflow]
amoghrajesh commented on PR #67902:
URL: https://github.com/apache/airflow/pull/67902#issuecomment-4609575104
Great conversation folks, I redid this as flat denormalized columns instead of a FK to `task_instance` and integrated a `kind` mode too.
Now this is how it looks, recording these fields (`last_updated_by_kind/dag_id/run_id/task_id/map_index`) and an
`AssetStoreWriterKind` enum (`task`/`watcher`/`api`). Main reasons:
- Watchers (`BaseEventTrigger`) have no task instance, so a FK can't be the
universal reference
- Flat columns survive task instance cleanup; a FK would lose the history on delete
| `kind` | `dag_id` | `run_id` | `task_id` | `map_index` |
|--------|----------|----------|-----------|-------------|
| `task` | set | set | set | set |
| `watcher` | `null` | `null` | `null` | `null` |
| `api` | `null` | `null` | `null` | `null` |
Validation is enforced at write time via `AssetStoreWriterKind.validate_writer_fields()`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org