Proposal: Reusable Query Files for Dataview #2601
ChrisM0815
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I often have multiple notes where the query logic is mostly the same, except for some dynamic values like this.name, this.aliases, etc. As a result, I end up with many copies of identical Dataview queries in my vault.
It would be very helpful if Dataview queries could be stored in separate text files (e.g., with a .dataview extension) and invoked from other notes via a simple reference. This reduces duplication and also improves maintainability (editing the query in one place would update all uses)
Ideally, this could work using Obsidian’s native embed syntax, e.g., ![[my-query.dataview]]. If that’s not feasible due to plugin limitations, it might be implemented similarly to how the Embed Code File plugin handles embedding code.
I have seen this is possible for .js files with dv.view but haven' t found anything for loading non .js files that contain basic dataview queries.
Beta Was this translation helpful? Give feedback.
All reactions