Build a template to pull data from linked notes

What I’m trying to do

I have a large collection of ‘skills’ md files, each of which has YAML frontmatter for ID, title, function and other parameters.

Next we have a csv table of job descriptions (rows) and skill_id (cols) with each cell containing a number representing the required skill level in that job (may also be null).

I’d like to end up with a set of md notes for the job descriptions with the skill_ids for that job tabulated along with the metadata pulled over from each skill md file.

Things I have tried

I found the excellent JSON/CSV Importer plug in (GitHub - farling42/obsidian-import-json: Plug-in for which will create Notes from JSON files) and this allowed me to generate all the skills md files from csv.

I have tried a few approaches to formatting the csv data so that i can generate a job description md files in the same way, but I’m stuck as I only want to pull in those skills that have an entry (ignoring null values) and I don’t want to have to write a template based on the large number of skills.

For example, I can concatenate all the skill_id fields for each level to greatly simplify the template with a string like [[1233A]], [[4125A]], [[1425B]], [[etc.]] importing into a dataview template.


TABLE field 1, field 2, etc.,
WHERE skill_id IN (1234A, 2345B, 3456C, etc.)

However this doesn’t work. There’s no 'IN" syntax afik?

So I think I would need instead the following, and haven’t worked out how to template it:

TABLE field 1, field 2, etc.,
WHERE skill_id = "1234A" 
OR skill_id = "2345B"
OR skill_id = "3456C"
OR skill_ID =  etc.

Any thoughts on how to write the import template, an alternative way forward, or correct ‘WHERE’ syntax to compare to a list, would be hugely appreciated.

For reference of any interested people I managed to solve this, the bit I was missing is ‘contain’

TABLE skill_id, skill_name, etc.,
WHERE contains(this.skills1,

My template uses handlebars to import the data from csv file to YAML in a key called ‘skills1’, ‘skills2’ etc. The above WHERE clause then looks for any notes whose title contains one of those skills values.

I used the callouts code to neatly arrange the tables for each skill level in expandable blocks.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.