Results of 1 - 10 of about 33 for register (0.003 sec.)
- Statically Linking Extensions 13107
- This page is for client and binding authors, and for anyone who embeds libduckdb in their own application. It describes how statically linking extensions changed in DuckDB 2.0 and what builders on top of DuckDB need to do. This change is in
...even if you continue to build against the existing (v1) C API: the difference is in how extension archives are linked and registered, not in which API your bindings call. What Changed in DuckDB 2.0 New Link-time static linking of extensions was introduc...ensions, httplib , and loadable extensions are now separate archives. The generated loader that libduckdb_static.a used to register extensions automatically. libduckdb_static.a no longer registers extensions on its own. Registering Statically Linked Exte...nsions Because extension selection moved to link time, a client that statically links extensions must now register them with the engine before any database is opened. Each extension archive carries a generated describe function, duckdb_e... - https://man.mtool.work/duckdb/2.0/dev/building/linking_extensions.html
- Write User Defined Functions 12385
- 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
...function with the DuckDBFunctions.scalarFunction() builder — which returns an org.duckdb.DuckDBScalarFunctionBuilder — and register it on a connection with register() . Once registered, the function can be called from SQL by the name passed to withName().... The builder is single-use: it is finalized once register() (or close() ) is called. The simplest functions map directly to a Java functional interface. Pick the overload that matc...larFunction() .withName("java_add_one") .withParameter(int.class) .withReturnType(int.class) .withIntFunction(x -> x + 1) .register(conn); } SELECT java_add_one(41); The binary overloads take two arguments of the same type, declared with withParameters()... - https://man.mtool.work/duckdb/2.0/clients/java/functions.html
- Write User Defined Functions 11551
- Overview The Go client can register user-defined functions written in Go: scalar functions that map input rows to a single output value, and table functions that produce a set of rows. It can also register a replacement scan that rewrites a
...n unresolved table name into a query. Scalar and table functions are registered on a connection checked out with db.Conn() , while a replacement scan is registered on a Connector ; in each case the fu...nction is then callable from SQL like any built-in. The sections below build and register each. Scalar Functions A scalar function is a Go type that implements the duckdb.ScalarFunc interface, which has two metho...r holding the callback. The simplest form is RowExecutor , a func(values []driver.Value) (any, error) called once per row. Register an instance on a connection with duckdb.RegisterScalarUDF() . The following defines my_length(VARCHAR) -> INTEGER , adapte... - https://man.mtool.work/duckdb/2.0/clients/go/functions.html
- Write User Defined Functions 10171
- 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
...atch of rows. The sections below build and register each, then point to a template for packaging them as a loadable extension. Scalar Functions A scalar function is a type th...at implements the VScalar trait, registered on a connection with register_scalar_function() . DuckDB calls the function's invoke() once per data chunk, passing a ba...alTypeHandle::from(LogicalTypeId::Bigint), )] } } fn main() -> Result<()> { let conn = Connection::open_in_memory()?; conn.register_scalar_function::<AddOne>("add_one")?; let mut stmt = conn.prepare("SELECT add_one(i) FROM range(5) t(i)")?; let values: V... - https://man.mtool.work/duckdb/2.0/clients/rust/functions.html
- Handle Results 9353
- 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
...ails after execution has started. Querying an Arrow Batch An Arrow RecordBatch produced elsewhere in a Rust program can be registered as a DuckDB table function and queried in SQL. Enable the vtab-arrow feature, register the built-in ArrowVTab table func...}; use duckdb::vtab::arrow::{arrow_recordbatch_to_query_params, ArrowVTab}; let conn = Connection::open_in_memory()?; conn.register_table_function::<ArrowVTab>("arrow")?; let params = arrow_recordbatch_to_query_params(cities_batch); let batches: Vec<Reco...tion >= 500000 ORDER BY population DESC", )? .query_arrow(params)? .collect(); The batch is addressed by the name given to register_table_function() ( arrow here), and DuckDB filters, orders, and aggregates it like any other table. arrow_recordbatch_to_q... - https://man.mtool.work/duckdb/2.0/clients/rust/result_handling.html
- Import Data 9353
- Overview DuckDB-Wasm has multiple ways to import data, depending on the format of the data. Importing happens in two steps. The data file is registered in a virtual file system using one of the register functions ( registerFileBuffer , register
...sterFileHandle , registerFileText , registerFileURL ). These are called on the database object ( db ), because a registered file is visible to every...which are called on a connection ( conn ). Alternatively, the Parquet, JSON, or Wasm-flavored httpfs extensions can read a registered — or remote — file directly from a FROM SQL query, and INSERT statements can load values inline. The examples below all...marker streamInserts.push(conn.insertArrowFromIPCStream(EOS, { name: 'streamed' })); await Promise.all(streamInserts); CSV Register the CSV text as a file, then load it with insertCSVFromPath() . The insert options describe the target table and, when aut... - https://man.mtool.work/duckdb/2.0/clients/wasm/data_ingestion.html
- Using fsspec Filesystems 8807
- DuckDB support for fsspec filesystems allows querying data in filesystems that DuckDB's httpfs extension does not support. fsspec has a large number of inbuilt filesystems , and there are also many external implementations . This capability
...must install duckdb and fsspec , and a filesystem interface of your choice. pip install duckdb fsspec gcsfs Then, you can register whichever filesystem you'd like to query: import duckdb from fsspec import filesystem # this line will throw an exception...if the appropriate filesystem interface is not installed duckdb.register_filesystem(filesystem('gcs')) duckdb.sql("SELECT * FROM read_csv('gcs:///bucket/file.csv')") These filesystems are not imp... - https://man.mtool.work/duckdb/2.0/guides/python/filesystems.html
- Table Functions 8246
- The table function API can be used to define a table function that can then be called from within DuckDB in the FROM clause of a query. API Reference Overview duckdb_table_function duckdb_create_table_function (); void duckdb_destroy_table_
..._table_function_supports_projection_pushdown ( duckdb_table_function table_function , bool pushdown ); duckdb_state duckdb_register_table_function ( duckdb_connection con , duckdb_table_function function ); Table Function Bind void * duckdb_bind_get_extr..._function : The table function pushdown : True if the table function supports projection pushdown, false otherwise. duckdb_register_table_function Register the table function object within the given connection. The function requires at least a name, a bi...the function is incomplete or a function with this name already exists DuckDBError is returned. Syntax duckdb_state duckdb_register_table_function ( duckdb_connection con , duckdb_table_function function ); Parameters con : The connection to register it... - https://man.mtool.work/duckdb/2.0/clients/c/table_functions.html
- Complete API 8069
- 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
...db_logical_type type , idx_t index ); void duckdb_destroy_logical_type ( duckdb_logical_type * type ); duckdb_state duckdb_register_logical_type ( duckdb_connection con , duckdb_logical_type type , duckdb_create_type_info info ); Data Chunk Interface duc..._function_set_function ( duckdb_scalar_function scalar_function , duckdb_scalar_function_t function ); duckdb_state duckdb_register_scalar_function ( duckdb_connection con , duckdb_scalar_function scalar_function ); void * duckdb_scalar_function_get_extr...uckdb_add_scalar_function_to_set ( duckdb_scalar_function_set set , duckdb_scalar_function function ); duckdb_state duckdb_register_scalar_function_set ( duckdb_connection con , duckdb_scalar_function_set set ); idx_t duckdb_scalar_function_bind_get_argu... - https://man.mtool.work/duckdb/2.0/clients/c/api.html
- R Client 7973
- Installation To use the DuckDB R client, visit the R installation page . The latest stable version of the DuckDB R client is 2.0.0. Installation duckdb : R Client The DuckDB R client can be installed using the following command: install.pac
...print(res) # Sepal.Length Sepal.Width Petal.Length Petal.Width Species # 1 5.1 3.5 1.4 0.2 setosa It is also possible to “register” a R data frame as a virtual table, comparable to a SQL VIEW . This does not actually transfer data into DuckDB yet. Below...is an example: duckdb_register(con, "iris_view", iris) res <- dbGetQuery(con, "SELECT * FROM iris_view LIMIT 1") print(res) # Sepal.Length Sepal.Width Pe...age-collected. The reference is cleared when the connection is closed, but can also be cleared manually using the duckdb_unregister() method. Also refer to the data import documentation for more options of efficiently importing data. dbplyr DuckDB also p... - https://man.mtool.work/duckdb/2.0/clients/r.html
DuckDB 2.0 Documentation / man.mtool.work