Open ericemc3 opened 1 year ago
That sounds reasonable to me. 👍
In theory, we could also make a HEAD request for the file to get the MIME type, and then we might be able to make the type optional if the content-type response header is present. That might allow this:
DuckDBClient.of({
gentoo: "https://portal.edirepository.org/nis/dataviewer?packageid=knb-lter-pal.220.7&entityid=e03b43c924f226486f2f0ab6709d2381"
})
Or this:
DuckDBClient.of({
gentoo: {
url: "https://portal.edirepository.org/nis/dataviewer?packageid=knb-lter-pal.220.7&entityid=e03b43c924f226486f2f0ab6709d2381"
}
})
I'd like an equivalent of
gentoo = d3.csv("https://portal.edirepository.org/nis/dataviewer?packageid=knb-lter-pal.220.7&entityid=e03b43c924f226486f2f0ab6709d2381", d3.autoType)
with DuckDBClient.
both
and
won't work.
But this, simulating a FileAttachment structure, will work:
although it's rather complicated to memorize.
I would dream of something simple and intuitive like:
with fileType that could also be 'json' for instance (or 'parquet', 'arrow'...).