explaingit

blacksmithgu/obsidian-dataview

8,925TypeScriptAudience · writerComplexity · 2/5Setup · easy

TLDR

A plugin for the Obsidian note-taking app that lets you query your notes like a database, producing tables, lists, and task views from metadata you add to your files. No coding required for basic queries, a JavaScript API is available for advanced use.

Mindmap

mindmap
  root((Obsidian Dataview))
    Metadata sources
      YAML frontmatter
      Inline Key Value
    Query types
      DQL SQL-like
      Inline expressions
      JavaScript API
    Output views
      Tables
      Lists
      Task lists
    Use cases
      Reading trackers
      Task dashboards
      Project overviews
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a reading list table that automatically pulls all notes tagged as books, sorted by your personal rating field.

USE CASE 2

Create a dashboard note that shows every incomplete task across all your project notes in one view.

USE CASE 3

Query a folder of game notes to display a table of titles, play time, and ratings sorted by score.

USE CASE 4

Use the JavaScript API to build dynamic note views based on custom logic.

Tech stack

TypeScriptObsidian

Getting it running

Difficulty · easy Time to first run · 30min

In plain English

Obsidian Dataview is a plugin for Obsidian, a note-taking app where all your notes are stored as plain Markdown files on your own computer. Dataview turns your collection of notes into something you can query like a database: you add metadata to your notes, and then you write queries inside those notes that pull information across your entire vault and display it as tables, lists, or task lists. The metadata can come from two places. You can add a block of structured data at the top of a note (called frontmatter, written in YAML format) to record things like a rating, a date, or a category. You can also add inline fields anywhere in the body of a note using a simple Key:: Value syntax. Once your notes have this metadata, you can write queries in code blocks that Dataview reads and renders when you view the note. There are four ways to query. The simplest is the Dataview Query Language, which looks a bit like SQL. For example, you can write a query that shows all notes tagged as books, sorted by your rating field, displayed as a table. There are also inline expressions that evaluate inside a sentence of text. For more advanced use, there is a full JavaScript API that gives access to everything Dataview has indexed, which is much more flexible but requires knowing some JavaScript. A practical example from the README: if you have a folder of game notes, each with fields for time played, length, and rating, a single five-line query can produce a sorted table of all of them. Another query can show every uncompleted task across all your project notes at once. The JavaScript query option comes with a note on trust: those queries run with the same access level as any Obsidian plugin, meaning they can read, write, or delete files. The simpler DQL queries are sandboxed and cannot modify anything. Dataview is a hobby project maintained by an individual contributor. Installation happens through Obsidian's community plugin browser.

Copy-paste prompts

Prompt 1
Write an Obsidian Dataview DQL query that lists all notes in my Books folder showing the title, author, and rating frontmatter fields, sorted by rating descending.
Prompt 2
Write a Dataview query that shows all uncompleted tasks across my entire Obsidian vault, grouped by the note they belong to.
Prompt 3
I want to track movies in Obsidian using inline fields like Genre:: Thriller. Show me a Dataview query that makes a table of all movies sorted by genre.
Prompt 4
Write a dataviewjs block that counts how many notes I have in each folder and displays the result as a list.
Open on GitHub → Explain another repo

← blacksmithgu on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.