<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sub Engel</title>
    <description>The latest articles on DEV Community by Sub Engel (@productivityforge).</description>
    <link>https://dev.to/productivityforge</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4146089%2F2fb3c554-58cc-479b-92cd-b9527d47f4b0.png</url>
      <title>DEV Community: Sub Engel</title>
      <link>https://dev.to/productivityforge</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/productivityforge"/>
    <language>en</language>
    <item>
      <title>Dataview queries worth having in a developer vault</title>
      <dc:creator>Sub Engel</dc:creator>
      <pubDate>Mon, 28 Sep 2026 00:43:59 +0000</pubDate>
      <link>https://dev.to/productivityforge/dataview-queries-worth-having-in-a-developer-vault-59e</link>
      <guid>https://dev.to/productivityforge/dataview-queries-worth-having-in-a-developer-vault-59e</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;One thing to get out of the way first, because a lot of "Dataview for developers" posts get it wrong: &lt;strong&gt;Dataview only indexes Markdown notes in your vault.&lt;/strong&gt; It doesn't read &lt;code&gt;.ts&lt;/code&gt; files, it doesn't parse imports, and there is no &lt;code&gt;file.contents&lt;/code&gt; field to grep through. If you want to find skipped tests or map dependencies, use your editor, &lt;code&gt;rg&lt;/code&gt;, or a real static analysis tool. Dataview is for the notes &lt;em&gt;about&lt;/em&gt; your code.&lt;/p&gt;

&lt;p&gt;This post assumes you know the basics (&lt;code&gt;TABLE&lt;/code&gt;, &lt;code&gt;LIST&lt;/code&gt;, &lt;code&gt;TASK&lt;/code&gt;, &lt;code&gt;FROM&lt;/code&gt;, &lt;code&gt;WHERE&lt;/code&gt;). If not, the &lt;a href="https://blacksmithgu.github.io/obsidian-dataview/" rel="noopener noreferrer"&gt;official docs&lt;/a&gt; are short and good.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Tech debt register, sorted by priority
&lt;/h2&gt;

&lt;p&gt;Give each debt item its own note in a &lt;code&gt;debt/&lt;/code&gt; folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;debt&lt;/span&gt;
&lt;span class="na"&gt;area&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;auth&lt;/span&gt;
&lt;span class="na"&gt;priority&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;        &lt;span class="c1"&gt;# 1 = fix now ... 4 = someday&lt;/span&gt;
&lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;open&lt;/span&gt;       &lt;span class="c1"&gt;# open | in-progress | resolved&lt;/span&gt;
&lt;span class="na"&gt;created&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;2026-09-14&lt;/span&gt;
&lt;span class="na"&gt;estimate_hours&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;6&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;```&lt;/span&gt;&lt;span class="nl"&gt;dataview
&lt;/span&gt;&lt;span class="sb"&gt;TABLE area, priority, estimate_hours AS "Est. h", created
FROM "debt"
WHERE status != "resolved"
SORT priority ASC, created ASC&lt;/span&gt;
&lt;span class="p"&gt;```&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use a number for priority. If you store &lt;code&gt;severity: high&lt;/code&gt; and sort on it, Dataview sorts alphabetically and you get "critical, high, low, medium", which is not what anyone wants.&lt;/p&gt;

&lt;p&gt;To see what you've actually paid down, add a &lt;code&gt;resolved: 2026-09-20&lt;/code&gt; field when you close an item:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;```&lt;/span&gt;&lt;span class="nl"&gt;dataview
&lt;/span&gt;&lt;span class="sb"&gt;TABLE area, resolved, resolved - created AS "Took"
FROM "debt"
WHERE resolved
SORT resolved DESC
LIMIT 10&lt;/span&gt;
&lt;span class="p"&gt;```&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Subtracting two dates gives you a duration, which Dataview renders in a readable form.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. ADRs that are due for a second look
&lt;/h2&gt;

&lt;p&gt;Architecture decision records go stale quietly. The decision was right at the time; the constraints moved. A &lt;code&gt;reviewed&lt;/code&gt; date in the frontmatter lets you surface old ones:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;adr&lt;/span&gt;
&lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;accepted&lt;/span&gt;   &lt;span class="c1"&gt;# proposed | accepted | superseded | rejected&lt;/span&gt;
&lt;span class="na"&gt;decided&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;2025-06-02&lt;/span&gt;
&lt;span class="na"&gt;reviewed&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;2025-06-02&lt;/span&gt;
&lt;span class="na"&gt;superseded_by&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;```&lt;/span&gt;&lt;span class="nl"&gt;dataview
&lt;/span&gt;&lt;span class="sb"&gt;TABLE decided, reviewed, choice(reviewed &amp;lt; date(today) - dur(1 year), "revisit", "ok") AS "Freshness"
FROM "decisions"
WHERE status = "accepted"
SORT reviewed ASC&lt;/span&gt;
&lt;span class="p"&gt;```&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;choice(condition, ifTrue, ifFalse)&lt;/code&gt; takes exactly three arguments. If you want three buckets, nest it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;choice(reviewed &amp;lt; date(today) - dur(1 year), "revisit",
  choice(reviewed &amp;lt; date(today) - dur(6 months), "soon", "ok"))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;"Revisit" doesn't mean "wrong". It means "read this again and bump &lt;code&gt;reviewed&lt;/code&gt; if it still holds."&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Incidents with open follow-ups
&lt;/h2&gt;

&lt;p&gt;Incidents get written up; the action items are what get forgotten. If your incident notes use checkboxes for follow-ups, a &lt;code&gt;TASK&lt;/code&gt; query pulls every unfinished one into a single list:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;```&lt;/span&gt;&lt;span class="nl"&gt;dataview
&lt;/span&gt;&lt;span class="sb"&gt;TASK
FROM "incidents"
WHERE !completed
GROUP BY file.link&lt;/span&gt;
&lt;span class="p"&gt;```&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And a table view for the incidents themselves:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;```&lt;/span&gt;&lt;span class="nl"&gt;dataview
&lt;/span&gt;&lt;span class="sb"&gt;TABLE severity, service, occurred, length(filter(file.tasks, (t) =&amp;gt; !t.completed)) AS "Open items"
FROM "incidents"
WHERE length(filter(file.tasks, (t) =&amp;gt; !t.completed)) &amp;gt; 0
SORT occurred DESC&lt;/span&gt;
&lt;span class="p"&gt;```&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No manual &lt;code&gt;action_items_pending: 3&lt;/code&gt; field to keep in sync. The count comes from the checkboxes.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. PR reviews still waiting on something
&lt;/h2&gt;

&lt;p&gt;If you keep a short note per PR you're reviewing (or authored and are waiting on), a status field is enough:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;pr&lt;/span&gt;
&lt;span class="na"&gt;repo&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;api&lt;/span&gt;
&lt;span class="na"&gt;pr&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1234&lt;/span&gt;
&lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;waiting&lt;/span&gt;    &lt;span class="c1"&gt;# waiting | changes-requested | approved | merged&lt;/span&gt;
&lt;span class="na"&gt;opened&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;2026-09-18&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;```&lt;/span&gt;&lt;span class="nl"&gt;dataview
&lt;/span&gt;&lt;span class="sb"&gt;TABLE repo, pr, status, opened
FROM "reviews"
WHERE status = "waiting" OR status = "changes-requested"
SORT opened ASC&lt;/span&gt;
&lt;span class="p"&gt;```&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Want to flag the old ones? Filter on age instead of storing a &lt;code&gt;days_in_review&lt;/code&gt; number you'd have to update by hand:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;"waiting"&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;opened&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nb"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;today&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;dur&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Unfinished tasks from recent daily notes
&lt;/h2&gt;

&lt;p&gt;This is the one I'd keep open most often. If your daily notes have a date in the filename (&lt;code&gt;2026-09-27.md&lt;/code&gt;), Dataview exposes it as &lt;code&gt;file.day&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;```&lt;/span&gt;&lt;span class="nl"&gt;dataview
&lt;/span&gt;&lt;span class="sb"&gt;TASK
FROM "daily"
WHERE !completed AND file.day &amp;gt;= date(today) - dur(14 days)
GROUP BY file.link
SORT file.day DESC&lt;/span&gt;
&lt;span class="p"&gt;```&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Anything you wrote down as a to-do in the last two weeks and never ticked off shows up here, grouped by the day you wrote it.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Orphan notes
&lt;/h2&gt;

&lt;p&gt;Notes with no links in or out are usually either finished thoughts that never got connected, or junk:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;```&lt;/span&gt;&lt;span class="nl"&gt;dataview
&lt;/span&gt;&lt;span class="sb"&gt;LIST
FROM ""
WHERE length(file.inlinks) = 0 AND length(file.outlinks) = 0
SORT file.mtime ASC&lt;/span&gt;
&lt;span class="p"&gt;```&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I'd run this during a weekly review, not keep it on a dashboard. Either link them to something or delete them.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. What changed this week
&lt;/h2&gt;

&lt;p&gt;Useful for writing a weekly summary or standup notes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;```&lt;/span&gt;&lt;span class="nl"&gt;dataview
&lt;/span&gt;&lt;span class="sb"&gt;TABLE file.folder AS "Folder", file.mtime AS "Modified"
FROM ""
WHERE file.mtime &amp;gt;= date(today) - dur(7 days)
SORT file.mtime DESC&lt;/span&gt;
&lt;span class="p"&gt;```&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Things that trip people up
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dates must look like dates.&lt;/strong&gt; Frontmatter values like &lt;code&gt;2026-09-27&lt;/code&gt; are parsed as dates. &lt;code&gt;Sept 27&lt;/code&gt; is just text and date comparisons silently return nothing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Field names are normalized.&lt;/strong&gt; A field called &lt;code&gt;Due Date&lt;/code&gt; becomes &lt;code&gt;due-date&lt;/code&gt; in queries. Lowercase, no spaces saves you some confusion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test &lt;code&gt;FROM&lt;/code&gt; first.&lt;/strong&gt; When a query returns nothing, strip it down to &lt;code&gt;LIST FROM "folder"&lt;/code&gt; and add clauses back one at a time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Narrow &lt;code&gt;FROM&lt;/code&gt; in big vaults.&lt;/strong&gt; &lt;code&gt;FROM ""&lt;/code&gt; scans everything. Pointing at a folder or tag keeps dashboards snappy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep conventions written down.&lt;/strong&gt; A short note listing your frontmatter fields and allowed values matters more than any clever query. Queries break when half your notes say &lt;code&gt;status: done&lt;/code&gt; and the other half say &lt;code&gt;status: resolved&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where to start
&lt;/h2&gt;

&lt;p&gt;Don't build all of this at once. Pick the one query that answers a question you actually ask every week (for most people that's #5 or #1), add the frontmatter to new notes going forward, and let the dashboard fill up. Backfilling old notes is rarely worth it.&lt;/p&gt;




&lt;p&gt;If you'd rather start from a vault that already has these conventions and dashboards set up, I packaged mine as &lt;a href="https://subengel.gumroad.com/l/uoybkd" rel="noopener noreferrer"&gt;Dev Second Brain&lt;/a&gt; (Obsidian, needs Templater and Dataview).&lt;/p&gt;

</description>
      <category>obsidian</category>
      <category>productivity</category>
      <category>markdown</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
