On Tue, Oct 12, 2021 at 10:33 AM Bridger Dyson-Smith <bdysonsmith@gmail.com> wrote:
Hi Jonathan,

for $T in file:list($path-to-your-files)
let $TSV := csv:parse($T, map { 'separator': 'tab', 'header': true(), 'format': 'direct' })
return db:add($your-db, $TSV)

maybe? I'm probably getting something wrong, semantics-wise, w/ `db:add()`, but maybe it's close to get started?
Best,
Bridger

On Tue, Oct 12, 2021 at 9:31 AM Jonathan Robie <jonathan.robie@gmail.com> wrote:
I have a command file that configures a database, throwing a bunch of sources into various paths.

I have a set of TSV files. I want to do the equivalent of ADD TO, pointing to a directory of TSV files, so that they are parsed and converted to XML and placed in the appropriate path.

How do I do that?

Jonathan