I guess I’m always here to ask the dumb questions.
const table = await db.sql`...blah...`
…gives me a Table in the new Standard Library. How do I use it? I was expecting it to be available via something like Apache Arrow or the ADBC driver, where I could do something like const subset = table.filter(row => row.timestamp >= "2026-08-09 09:00") but there’s no filter(). Do I need to toArray() everything and just work “old school”?
I looked for documentation, but I’m not seeing it.
Yes, you need to use table.toArray (or [...table] or Array.from(table)) if you want to call array.filter. An example is given in the Database clients documentation.
In the near future, the SQL cell will support visual filtering using column summaries, which should help…
It should go without saying that we are always very grateful to anyone asking the “dumb” questions!! They are probably by far the most popular and broadly experienced issues!
(In life it’s not obvious what isn’t obvious…)
Flechette tables are not arrays, and thus don’t have the same array methods, but they are iterable, which means many functions handle them natively without requiring you to convert them to an array first. E.g.:
Plot.dot(table, {…})
Inputs.table(table, {…})
d3.max(table, d => …)