Results of 1 - 7 of about 7 for DuckDBConnection (0.002 sec.)
- Import Data 13068
- Overview The JDBC driver offers two ways to load data into DuckDB in bulk: the high-performance Appender and a JDBC batch writer. This page describes both and when to use each. Appender The Appender is available in the DuckDB JDBC driver vi
...a the org.duckdb.DuckDBAppender class. An appender is created from a DuckDBConnection with the createAppender() method, passing the table name and, optionally, the schema and catalog it is applied to. The App...ender is flushed when the close() method is called. Example: import java.sql.DriverManager; import org.duckdb.DuckDBConnection; DuckDBConnection conn = (DuckDBConnection) DriverManager.getConnection("jdbc:duckdb:"); try (var stmt = conn.createStatem...ing try-with-resources to automatically close the appender at the end of the scope try (var appender = conn.createAppender(DuckDBConnection.DEFAULT_SCHEMA, "tbl")) { appender.beginRow(); appender.append(10); appender.append(3.2); appender.append("hello"); append... - https://man.mtool.work/duckdb/2.0/clients/java/data_import.html
- Profile and Monitor 9487
- Overview The JDBC driver exposes several ways to observe a running or completed query: cancelling and timing out queries, polling query progress, retrieving profiling output, and emitting memory-usage events through Java Flight Recorder . T
...ort java.sql.DriverManager; import java.sql.SQLException; import java.util.concurrent.CompletableFuture; import org.duckdb.DuckDBConnection; import org.duckdb.DuckDBPreparedStatement; import org.duckdb.QueryProgress; try (DuckDBConnection conn = (DuckDBConnectio...getRowsProcessed(), progress.getTotalRowsToProcess()); Thread.sleep(100); } query.join(); } Profiling Cast a connection to DuckDBConnection and call getProfilingInformation(ProfilerPrintFormat) to retrieve profiling output for the most recent query on that conne...ormat: DEFAULT , TEXT , QUERY_TREE , QUERY_TREE_OPTIMIZER , NO_OUTPUT , JSON , HTML , GRAPHVIZ , YAML , and MERMAID . try (DuckDBConnection conn = (DuckDBConnection) DriverManager.getConnection("jdbc:duckdb:"); Statement stmt = conn.createStatement()) { stmt.exe... - https://man.mtool.work/duckdb/2.0/clients/java/profiling.html
- Handle Results 9396
- 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
...} } Arrow Import The following example consumes an Arrow stream produced by the Java Arrow bindings and registers it on a DuckDB connection with registerArrowStream() . Once registered, the stream is addressed by the name passed to that method and can be querie...ata; import org.apache.arrow.memory.RootAllocator; import org.apache.arrow.vector.ipc.ArrowStreamReader; import org.duckdb.DuckDBConnection; import org.duckdb.DuckDBResultSet; // Arrow binding try (var allocator = new RootAllocator(); ArrowStreamReader reader =....allocateNew(allocator)) { Data.exportArrayStream(allocator, reader, arrow_array_stream); // DuckDB setup try (var conn = (DuckDBConnection) DriverManager.getConnection("jdbc:duckdb:")) { conn.registerArrowStream("asdf", arrow_array_stream); // run a query try (... - https://man.mtool.work/duckdb/2.0/clients/java/result_handling.html
- Connect 8706
- Overview Every DuckDB feature reachable from Java starts with a Connection . This page covers the JDBC URL forms the driver accepts, how DuckDB and driver options are passed and which of them win, how connections come to share (or not share
...this explicit load: the service-provider discovery is not reliably visible to Native Image's static analysis. To create a DuckDB connection, call DriverManager with the jdbc:duckdb: JDBC URL prefix, like so: import java.sql.Connection; import java.sql.DriverMan...= DriverManager.getConnection("jdbc:duckdb:"); To use DuckDB-specific features such as the Appender , cast the object to a DuckDBConnection : import java.sql.DriverManager; import org.duckdb.DuckDBConnection; DuckDBConnection conn = (DuckDBConnection) DriverMana...ger.getConnection("jdbc:duckdb:"); Additional connections can be created using the DriverManager . The DuckDBConnection#duplicate() method opens another connection to the same database instance without re-reading the configuration: DuckDBConn... - https://man.mtool.work/duckdb/2.0/clients/java/connecting.html
- Run Queries 8160
- Overview Java applications send queries and read result sets through the familiar Statement , PreparedStatement , and ResultSet interfaces. This page covers sending queries and reading DuckDB's nested and composite types. For opening the Co
...the STRUCT type and attributes are the field values in declaration order. createMap(typeName, map) — a DuckDB extension on DuckDBConnection — returns an org.duckdb.user.DuckDBMap (a java.util.Map ) for a MAP , where typeName is the full map type such as MAP(VARC...HAR, INTEGER) . import java.sql.Array; import java.sql.Struct; import java.util.Map; import org.duckdb.DuckDBConnection; DuckDBConnection conn = (DuckDBConnection) DriverManager.getConnection("jdbc:duckdb:"); // LIST / ARRAY Array list = conn... - https://man.mtool.work/duckdb/2.0/clients/java/querying.html
- Appender 7688
- The Appender can be used to load bulk data into a DuckDB database. It is available in the C, C++, Go, Java, Julia, Node.js, Python, and Rust clients. This page describes how the Appender behaves across clients and shows a minimal example in
...string>("Hannes"); appender.EndRow(); For more information, see the C++ client . Java (JDBC) An appender is created from a DuckDBConnection with createAppender() , and rows are built with beginRow() , append() , and endRow() . Using try-with-resources flushes an...d closes it at the end of the scope: try (var appender = conn.createAppender(DuckDBConnection.DEFAULT_SCHEMA, "tbl")) { appender.beginRow(); appender.append(10); appender.append("hello"); appender.endRow(); } For mor... - https://man.mtool.work/duckdb/2.0/data/appender.html
- Node.js Client (Neo) 7070
- 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
...'@duckdb/node-api'; console.log(duckdb.version()); console.log(duckdb.configurationOptionDescriptions()); Connect import { DuckDBConnection } from '@duckdb/node-api'; const connection = await DuckDBConnection.create(); This uses the default instance. For advance... - https://man.mtool.work/duckdb/2.0/clients/node_neo/overview.html
PREV
1
NEXT
DuckDB 2.0 Documentation / man.mtool.work