Dataview queries worth having in a developer vault
Dataview turns the frontmatter in your Obsidian notes into something you can query like a small database. For a developer vault, that means you can keep debt, decisions, incidents and review notes as plain Markdown files and still get live dashboards out of them. One thing to get out of the way first, because a lot of "Dataview for developers" posts get it wrong: Dataview only indexes Markdown…
Dataview empowers developers to query their Obsidian notes as if they were part of a small database. This allows creating live dashboards from plain Markdown files containing debt, decisions, incidents, and review notes. The first step is to understand that Dataview only indexes Markdown notes, not other file types or imports. Once that's clear, developers can start with common queries.
For tech debt, each debt item should be stored in a debt/ folder with frontmatter specifying area, priority, status, created, and estimate_hours. A Dataview query can then display a sorted table of area, priority, estimate_hours, and creation date for non-resolved debts.
Architecture decision records (ADRs) can be reviewed periodically to ensure decisions remain relevant. By adding a reviewed date to the frontmatter, a Dataview query can surface ADRs due for a second look. The choice(field, ifTrue, ifFalse) function can create buckets based on the reviewed duration, indicating whether the decision is fresh (revisit), overdue (soon), or still good (ok).
To track incident follow-ups, use checkboxes in incident notes. A TASK query can list all unfinished follow-ups, while a table view can display severity, service, incident time, and open items count. This eliminates the need for a separate pending field, as the count is derived from the checkboxes.
For PR reviews, a status field can track review progress (waiting, changes-requested, approved, merged). A Dataview query can list PRs waiting for action or awaiting changes, helping developers prioritize their review workload.
Daily notes with a date in the filename can be queried to find unfinished tasks from the past two weeks. By filtering for completed status and comparing the date with today's date minus 14 days, developers can see a list of tasks grouped by the writing day. This query helps identify tasks that may have been forgotten or need further action.
Lastly, to identify orphan notes with no links, a LIST query can scan the vault and return notes where both inlinks and outlinks count are zero. This query is useful during weekly reviews, allowing developers to decide whether to link, delete, or archive these notes. By starting with a few essential queries and gradually expanding the Dataview toolkit, developers can efficiently manage their notes and gain valuable insights from their Obsidian vault.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.