Results of 1 - 10 of about 15 for chunks (0.002 sec.)
- Data Chunks 12992
- Data chunks represent a horizontal slice of a table. They hold a number of vectors , that can each hold up to the VECTOR_SIZE rows. The vector size can be obtained through the duckdb_vector_size function and is configurable, but is usually
...set to 2048 . Data chunks and vectors are what DuckDB uses natively to store and represent data. For this reason, the data chunk interface is the mo...correctly interfacing with DuckDB using the data chunk API does require knowledge of DuckDB's internal vector format. Data chunks can be used in two manners: Reading Data : Data chunks can be obtained from query results using the duckdb_fetch_chunk met...ut to a user-defined function. In this case, the vector methods can be used to read individual values. Writing Data : Data chunks can be created using duckdb_create_data_chunk . The data chunk can then be filled with values and used in duckdb_append_da... - https://man.mtool.work/duckdb/2.0/clients/c/data_chunk.html
- Node.js Client (Neo) 11808
- Installation To use the DuckDB Node.js client, visit the Node.js installation page . The latest stable version of the DuckDB Node.js (Neo) client is 2.0.0. An API for using DuckDB in Node.js . The primary package, @duckdb/node-api , is a hi
....streamAndReadUntil( 'from range(5000)', 1000 ); const rows = reader.getRows(); // rows.length === 2048. (Rows are read in chunks of 2048.) Read rows incrementally: const reader = await connection.streamAndRead('from range(5000)'); reader.readUntil(200...0); // reader.currentRowCount === 2048 (Rows are read in chunks of 2048.) // reader.done === false reader.readUntil(4000); // reader.currentRowCount === 4096 // reader.done === false rea.../ "name", // "age" // ], // "memberTypes": [ // { // "typeId": 17 // }, // { // "typeId": 3 // } // ] // } // } // ] Fetch Chunks Fetch all chunks: const chunks = await result.fetchAllChunks(); Fetch one chunk at a time: const chunks = []; while (true)... - https://man.mtool.work/duckdb/2.0/clients/node_neo/overview.html
- Run Queries 10205
- Overview DuckDB-Wasm provides functions for querying data. Queries are run sequentially: First, create a connection by calling connect . Then, run queries by calling query to materialize the whole result, or send to fetch result chunks lazi
...ery result await conn.query<{ v: arrow.Int }>(` SELECT * FROM generate_series(1, 100) t(v) `); // ..., or fetch the result chunks lazily for await (const batch of await conn.send<{ v: arrow.Int }>(` SELECT * FROM generate_series(1, 100) t(v) `)) { // ....generate_series(0, 10_000) t(v);`); // ... and run it with materialized results await stmt.query(234); // ... or as result chunks for await (const batch of await stmt.send(234)) { // ... } // Close the statement to release memory await stmt.close(); //... - https://man.mtool.work/duckdb/2.0/clients/wasm/query.html
- Handle Results 9665
- Overview Beyond the standard JDBC ResultSet , the DuckDB driver can hand results to Apache Arrow , stream large results instead of materializing them, and expose raw columnar data chunks. This page covers each of these result-handling optio
...:duckdb:", props); Chunked Results The JDBC driver can return a query result as a lazily fetched sequence of columnar data chunks via the org.duckdb.DuckDBChunkedResult class. This exposes the C API's duckdb_fetch_chunk function to Java and avoids the...r-defined functions . Call query() on a DuckDBPreparedStatement to obtain a DuckDBChunkedResult , then advance through the chunks with nextChunk() and read each column vector by index. Example: import java.sql.DriverManager; import org.duckdb.DuckDBCon... - https://man.mtool.work/duckdb/2.0/clients/java/result_handling.html
- Types 9282
- DuckDB is a strongly typed database system. As such, every column has a single type specified. This type is constant over the entire column. That is to say, a column that is labeled as an INTEGER column will only contain INTEGER values. Duc
...result to be de-allocated using duckdb_free . duckdb_fetch_chunk The duckdb_fetch_chunk function can be used to read data chunks from a DuckDB result set, and is the most efficient way of reading data from a DuckDB result using the C API. It is also t...eading of composite types (lists or structs) or more complex types like enums or decimals. For more information about data chunks, see the documentation on data chunks . API Reference Overview duckdb_data_chunk duckdb_result_get_chunk ( duckdb_result r....e., this function cannot be mixed with the legacy result functions). Use duckdb_result_chunk_count to figure out how many chunks there are in the result. Syntax duckdb_data_chunk duckdb_result_get_chunk ( duckdb_result result , idx_t chunk_index ); Pa... - https://man.mtool.work/duckdb/2.0/clients/c/types.html
- Handle Results 8882
- Overview Beyond reading a result set row by row , the Rust client can hand a query result to Apache Arrow as a stream of record batches, register an Arrow batch as a queryable table, and return results as Polars data frames. Each of these c
...d in memory even while the iterator is advanced one batch at a time. For a result that should be consumed lazily, fetching chunks only as the iterator advances, use stream_arrow() , which is otherwise identical: let mut stmt = conn.prepare("SELECT * FR...mut stmt = conn.prepare("SELECT * FROM test")?; let dfs: Vec<DataFrame> = stmt.query_polars([])?.collect(); To combine the chunks into a single DataFrame , use accumulate_dataframes_vertical_unchecked from polars_core . The crate re-exports polars , so... - https://man.mtool.work/duckdb/2.0/clients/rust/result_handling.html
- Write User Defined Functions 8481
- Overview The JDBC driver can register user-defined functions (UDFs) written in Java, including scalar functions and table functions. This page covers building and registering both, from the simple functional-interface overloads to the vecto
...tained. The Java table function interface mirrors DuckDB's C API table functions as closely as possible. Producing Rows in Chunks The example above writes every row in a single apply call, but a table function is not expected to. DuckDB calls apply rep...t) state so it survives across calls, rather than in a local variable. The apply below streams a bounded integer series in chunks. It also dispatches on each column's declared type with DuckDBWritableVector.getType() , which is convenient when the same...DB the scan is finished } }) .register(conn); Calling FROM java_series(5000) drives apply three times — two full 2,048-row chunks and a final partial one — before the fourth call returns 0 . Cleaning up Resources A table function may hold open resource... - https://man.mtool.work/duckdb/2.0/clients/java/functions.html
- Import Data 7680
- Overview The Go client offers two ways to load data into DuckDB in bulk: the high-performance Appender for inserting rows generated in Go, and reading directly from data files such as Parquet, CSV, and JSON. Both are described below. For in
...(34) for an INTEGER column. Call AppendRow() once per row. Warning The appender buffers rows and flushes them to DuckDB in chunks, so a constraint violation such as a NOT NULL or foreign-key failure may surface only when the buffer is flushed rather th... - https://man.mtool.work/duckdb/2.0/clients/go/data_import.html
- Write User Defined Functions 7541
- Overview The Rust client can register user-defined functions written in Rust: scalar functions with the vscalar feature and table functions with the vtab feature. Both operate on DuckDB's columnar data chunks, so a single call processes a b
... - https://man.mtool.work/duckdb/2.0/clients/rust/functions.html
- Rust Client 7541
- Installation To use the DuckDB Rust client, visit the Rust installation page . The latest stable version of the DuckDB Rust client is 2.0.0. The DuckDB Rust client, duckdb-rs , is an ergonomic wrapper over the DuckDB C API that exposes an i
...nctions . vtab-arrow Apache Arrow integration for table functions, converting between an Arrow RecordBatch and DuckDB data chunks. Implies vtab . vscalar Scalar functions . Implies vtab-arrow . vscalar-arrow Arrow-optimized scalar functions, intended f... - https://man.mtool.work/duckdb/2.0/clients/rust/overview.html
DuckDB 2.0 Documentation / man.mtool.work