Skip to main content
DQL (DataView Query Language) lets you query frontmatter metadata across your entire knowledge base. It is inspired by Obsidian Dataview but runs server-side against the SQLite metadata index.

Query modes

DQL supports four output modes.
  • TABLE returns tabular results with the fields you specify.
  • LIST returns a flat list of matching page paths.
  • COUNT returns the number of matching pages.
  • DISTINCT returns unique values for a single field.

Clauses

Implicit fields

Every page exposes these fields without any frontmatter:

Expressions

DQL supports arithmetic, function calls, string interpolation, comparisons, and boolean logic inside WHERE and computed field definitions.

Built-in functions

DQL ships with 27 functions:
now(), date(), duration(), days_since(), format()
lower(), upper(), trim(), split(), join(), contains(), regextest()
round(), floor(), ceil(), abs(), min(), max()
len(), sum(), avg(), first(), last(), sort(), reverse(), unique()
meta() — access implicit fields programmatically.

CLI usage

Run a DQL query from the command line:

REST API

Run a DQL query over HTTP:

Aggregation

Use the aggregate command to group and summarize metadata:
Supported aggregation functions: count, avg, sum, min, max. You can group by any frontmatter field.

Computed views

A markdown file with kiwi-view: true in its frontmatter becomes a computed view. KiwiFS auto-refreshes the file body from a DQL query embedded in the frontmatter.
The body of this file is overwritten with live query results on every index update. Think of it as a saved query that always shows current data.

Computed frontmatter fields

You can define virtual fields in .kiwi/config.toml that are evaluated at index time. These fields are queryable like any other frontmatter field.
Computed fields are recalculated on every reindex. They do not modify your source files.
Last modified on May 3, 2026