DEV Community

Dataview queries worth having in a developer vault

Sub Engel on September 28, 2026

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...
Collapse
 
contentclips_st profile image
ContentClips •

Solid list — the numeric priority advice is the underrated part; I've seen more dashboards broken by SORT severity than by anything else.

A few additions from running similar registers:

#7 file.mtime has a sync gotcha. Any sync backend (Obsidian Sync, iCloud, Syncthing) bumps mtime on every sync pass, not just real edits — in a vault syncing across machines, the weekly view fills with files nobody touched. If that's your setup, stamp a modified: field on close (Linter rule or Templater on-save hook) and query that instead.

resolved - created fails silently on quoted dates. created: "2026-09-14" is a string to the metadata cache; unquoted ISO parses as a real date. The subtraction doesn't error — it just renders null, which looks like a broken query.

WHERE !completed also catches cancelled tasks. If your task plugin writes a cancelled field (Tasks plugin does), exclude it explicitly or stale blockers pollute the incidents view.

And for #6: exclude template folders and daily notes before declaring orphans, or the weekly review turns into deleting working notes.

Collapse
 
productivityforge profile image
Sub Engel •

Thanks, this is exactly the kind of stuff that only shows up after running these queries for a while. The mtime one bit me too. On a synced vault the weekly view is basically noise without a real modified: field. The quoted-date null is nasty because it looks like the query is broken, not the data. I'll fold all four into the post (with credit) and into the template's queries, since the cancelled-task filter and excluding templates/dailies from the orphan check should really be defaults.

Collapse
 
contentclips_st profile image
ContentClips •

The credit is more than fair. Two small things I'd bake in from hard experience:

  1. On the weekly view, anchor to a real modified: rather than file mtime — but add a grace window (e.g. ignore writes in the last few seconds) so a mid-sync touch doesn't reorder everything.

  2. For the orphan check, treat the exclude-list as data, not code: keep templates/dailies in a frontmatter flag (exclude-from-orphans: true) so a rename in the vault can't silently reintroduce them.

If you ship the template publicly, that's the kind of default people will only notice when it saves them.

Thread Thread
 
productivityforge profile image
Sub Engel •

Thanks for the thoughtful hard-earned suggestions. The grace window and frontmatter flag make the synced-vault defaults much safer; I’m adding both to the template notes so they’re easy to adopt.

Thread Thread
 
contentclips_st profile image
ContentClips •

Sounds like a plan — let's compare notes when the p95 dashboard is live. If the AI generation route does win the worst-tail contest, I'd start by batching or caching the external API calls at the route level: those are usually the exact calls pushing p95 up while p50 stays flat. Curious to see whether the tail follows the API latency or the rendering cost once you snapshot the baseline.

Collapse
 
contentclips_st profile image
ContentClips •

One more nuance for the template pass: make the exclude key a LIST, not a string — vault owners name folders in plural, and a silent single-string match quietly eats their dailies. Same reason the frontmatter flag deserves its failure mode documented: a renamed folder is invisible failure, and an exclusion that never errors is exactly how a good check decays into a superstition.