duckdb.query

Run SQL typed into the block over the connected tables with DuckDB, without network. The tables are views named t0, t1, ... in connection order.

  • Kind: standard
  • Network: no
  • Memory: 8Gi

Inputs🔗

NameTypeRequiredDefaultDescription
sqlstringyesThe SQL to run, in DuckDB's dialect. Several statements are allowed; the result of the last is the output. Refer to tables as t0, t1, ...
tablescollection of file (Parquet)noTables to query (Parquet or CSV), bound as t0, t1, ... in order. Leave unconnected for a query that makes its own data.
output_formatstringnoparquetFile format of the result. One of parquet, csv.

Outputs🔗

NameTypeDescription
resultfile (Parquet)The result of the last statement.

Example🔗

- id: "@query"
  name: duckdb.query
  inputs: [{block: "@plots", output: result, as: tables}]
  args:
    sql: SELECT species, sum(biomass) AS total FROM t0 GROUP BY 1 ORDER BY 2 DESC