Skip to content

md-table-query

Keep straight records — lists that would otherwise be CSV — as ordinary Markdown tables in a note. They render in Obsidian, diff cleanly and stay hand-editable. This skill reads them back as rows and runs SQL over them. It never writes to the source note: CSV files and the DuckDB database exist only for the length of one command.

  • Area: Foundational
  • Category: obsidian
  • Level: advanced
  • Input: conversation
  • Output: document
  • Setup: install
  • Roles:

Queries Markdown tables in place as records, with optional DuckDB SQL joins across notes, keeping the .md file as the source of truth.

How you ask

  • “Query this markdown table in my clients note and show it as CSV”
  • “Join the invoices tables with the clients table and sum the amount per client”
  • “Sum the day_rate column of the Active clients table”
  • “Turn the table in this note into JSON records”
  • “Which tables are in DATAMODEL.md, and what are they called?”

Inputs

  • notes — One or more note paths or quoted globs
  • source (Read a table as records) — PATH[#table], where PATH may be a quoted glob
  • format — md (default), json, ndjson, csv or tsv
  • query — DuckDB SQL over the source aliases
  • sources — One or more PATH[#table][=alias]

Outputs

  • query-result (markdown)
  • records (markdown)
  • stdout
  • table-list (text)