Results of 1 - 10 of about 25 for chunk (0.005 sec.)
- Data Chunks 13533
- 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 m...ost efficient way of interfacing with DuckDB. Be aware, however, that 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 method, or as input to a user-defined function. In this c... - https://man.mtool.work/duckdb/2.0/clients/c/data_chunk.html
- Complete API 11291
- This page contains the reference for DuckDB's C API. The reference contains several deprecation notices. These concern methods whose long-term availability is not guaranteed as they may be removed in the future. That said, DuckDB's develope
...kdb_result * result ); duckdb_error_type duckdb_result_error_type ( duckdb_result * result ); Result Functions duckdb_data_chunk duckdb_result_get_chunk ( duckdb_result result , idx_t chunk_index ); bool duckdb_result_is_streaming ( duckdb_result resu...lt ); idx_t duckdb_result_chunk_count ( duckdb_result result ); duckdb_result_type duckdb_result_return_type ( duckdb_result result ); Safe Fetch Function...ate duckdb_register_logical_type ( duckdb_connection con , duckdb_logical_type type , duckdb_create_type_info info ); Data Chunk Interface duckdb_data_chunk duckdb_create_data_chunk ( duckdb_logical_type * types , idx_t column_count ); void duckdb_des... - https://man.mtool.work/duckdb/2.0/clients/c/api.html
- Node.js Client (Neo) 10627
- 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(20...00); // reader.currentRowCount === 2048 (Rows are read in chunks of 2048.) // reader.done === false reader.readUntil(4000); // reader.currentRowCount === 4096 // reader.done === false re.../ "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
- Vectors 10029
- Vectors represent a horizontal slice of a column. They hold a number of values of a specific type, similar to an array. Vectors are the core data representation used in DuckDB. Vectors are typically stored within data chunks . The vector an
...d data chunk interfaces are the most efficient way of interacting with DuckDB, allowing for the highest performance. However, the inter...ogical type can then be obtained using duckdb_get_type_id . Vectors themselves do not have sizes. Instead, the parent data chunk has a size (that can be obtained through duckdb_data_chunk_get_size ). All vectors that belong to a data chunk have the sa...THEN NULL ELSE i END res_col FROM range(10) t(i)", &res); // iterate until result is exhausted while (true) { duckdb_data_chunk result = duckdb_fetch_chunk(res); if (!result) { // result is exhausted break; } // get the number of rows from the data c... - https://man.mtool.work/duckdb/2.0/clients/c/vector.html
- Appender 9996
- Appenders are the most efficient way of loading data into DuckDB from within the C interface, and are recommended for fast data loading. The appender is much faster than using prepared statements or individual INSERT INTO statements. Append
...ppender appender ); duckdb_state duckdb_append_default ( duckdb_appender appender ); duckdb_state duckdb_append_default_to_chunk ( duckdb_appender appender , duckdb_data_chunk chunk , idx_t col , idx_t row ); duckdb_state duckdb_append_bool ( duckdb_a...der ); duckdb_state duckdb_append_value ( duckdb_appender appender , duckdb_value value ); duckdb_state duckdb_append_data_chunk ( duckdb_appender appender , duckdb_data_chunk chunk ); duckdb_appender_create Creates an appender object. Note that the o...ppender ); Parameters appender : The appender to get the column count from. Return Value The number of columns in the data chunks. duckdb_appender_column_type Returns the type of the column at the specified index. This is either a type in the active c... - https://man.mtool.work/duckdb/2.0/clients/c/appender.html
- Handle Results 9730
- 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
...DBDriver.JDBC_STREAM_RESULTS, String.valueOf(true)); Connection conn = DriverManager.getConnection("jdbc:duckdb:", props); Chunked Results The JDBC driver can return a query result as a lazily fetched sequence of columnar data chunks via the org.duckd...b.DuckDBChunkedResult class. This exposes the C API's duckdb_fetch_chunk function to Java and avoids the per-row overhead required by th...e JDBC ResultSet interface. Chunk contents are read through the same DuckDBDataChunkReader API that is used by user-defined functions . Call query() on a Du... - https://man.mtool.work/duckdb/2.0/clients/java/result_handling.html
- Query 9049
- The duckdb_query method allows SQL queries to be run in DuckDB from C. This method takes two parameters, a (null-terminated) SQL query string and a duckdb_result result pointer. The result pointer may be NULL if the application is not inter
...we are done with it duckdb_destroy_result(&result); Value Extraction Values can be extracted using either the duckdb_fetch_chunk function, or using the duckdb_value convenience functions. The duckdb_fetch_chunk function directly hands you data chunks...to use, at the expense of being slower. See the Types page for more information. For optimal performance, use duckdb_fetch_chunk to extract data from the query result. The duckdb_value functions perform internal type-checking, bounds-checking and cast...ing which makes them slower. duckdb_fetch_chunk Below is an end-to-end example that prints the above result to CSV format using the duckdb_fetch_chunk function. Note that... - https://man.mtool.work/duckdb/2.0/clients/c/query.html
- Types 9016
- 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
...e freed. duckdb_value_varchar and duckdb_value_blob require the 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...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...result , idx_t chunk_index ); bool duckdb_result_is_streaming ( duckdb_result result ); idx_t duckdb_result_chunk_count ( duckdb_result result... - https://man.mtool.work/duckdb/2.0/clients/c/types.html
- Write User Defined Functions 8086
- 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
...lar trait, registered on a connection with register_scalar_function() . DuckDB calls the function's invoke() once per data chunk, passing a batch of input rows and expecting the corresponding output values written back. signatures() declares the argum...INT argument as a slice of i64 and writes each result into the output vector: use duckdb::{ Connection, Result, core::{DataChunkHandle, LogicalTypeHandle, LogicalTypeId}, vscalar::{ScalarFunctionSignature, VScalar}, vtab::arrow::WritableVector, }; str...impl VScalar for AddOne { // No per-function state is needed. type State = (); fn invoke( _: &Self::State, input: &mut DataChunkHandle, output: &mut dyn WritableVector, ) -> Result<(), Box<dyn std::error::Error>> { let len = input.len(); let src = inp... - https://man.mtool.work/duckdb/2.0/clients/rust/functions.html
- Conversion between DuckDB and Python 7771
- This page documents the rules for converting DuckDB results to Python and Python objects to DuckDB . Result Conversion: DuckDB Results to Python A result is read from a relation or, when using the DB-API / con.execute() , from the connectio
...one() , fetchmany(size=1) , fetchall() Python dicts to_dicts() NumPy fetchnumpy() fetchnumpy() Pandas df() df() , fetch_df_chunk() Apache Arrow to_arrow_table() , to_arrow_reader() to_arrow_table() , to_arrow_reader() , both make a copy Polars pl() Py...ded for most conversion, except when you want to do row-based work. A relation has no fetchone() , fetchmany() or fetch_df_chunk() because it is stateless, i.e. it does not hold a result itself. To get specific rows of a result with the relational API...df() fetches the data as a Pandas DataFrame fetchdf() and, on the connection, fetch_df() are older names of df() fetch_df_chunk(vectors_per_chunk) fetches the next portion of the results of con.execute() into a DataFrame. Each chunk has at most the v... - https://man.mtool.work/duckdb/2.0/clients/python/conversion.html
DuckDB 2.0 Documentation / man.mtool.work