blacksmithgu / obsidian-dataview

A data index and query language over Markdown files, for https://obsidian.md/.
https://blacksmithgu.github.io/obsidian-dataview/
MIT License
6.85k stars 405 forks source link

Request: Query from YAML data file #91

Open PeterTheobald opened 3 years ago

PeterTheobald commented 3 years ago

It would be so powerful if Dataview could query from one text note file that contains a full database in the form of a YAML file. Eg:

table from MyMovieDatabase

Note: MyMovieDatabase:

blacksmithgu commented 3 years ago

So something like having a db.yml file or something, say:

movie: 2001 A Space Odyssey
director: Stanley Kubrick
year: 1968
---
...
---
movie: Star Wars
director: George Lucas
year: 1977

And then you could pull data from it directly via TABLE FROM yml("db.yml") or something. If so, I agree - seems like a cool idea. Probably not too hard to implement. Will put it on my docker after my current slew of QOL improvements.

AB1908 commented 1 year ago

Interesting idea. This could probably be done with Daniel's text files plugin and some JS. IMO, that's the way to go since adding and maintaining file adapters seems outside of the scope of this plugin. Also because it's likely enough that people with separate yaml files are likely technical enough to accomplish this themselves.

blacksmithgu commented 1 year ago

JS is the correct way to do this now; I think a quick workaround would be to add dv.io.yml to support loading yaml files into data arrays to make it easier.