⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 10 of about 22 for Java (0.004 sec.)
Troubleshoot 11868
Overview This page collects common issues encountered when using the DuckDB JDBC driver, together with their workarounds. If you run into a problem that is not covered here, search the driver's issue tracker on GitHub. Driver Class Not Foun ... DBC driver is not on the application's classpath, typically because the build tool has not resolved the dependency. If the Java application is unable to find the DuckDB driver, it may throw the following error: Exception in thread "main" java.sql.SQL ... Exception: No suitable driver found for jdbc:duckdb: at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:706) at java.sql/java.sql.DriverManager.getConnection(DriverMa ... nager.java:252) ... And when trying to load the class manually, it may result in this error: Exception in thread "main" java.lang.Cla ...
https://man.mtool.work/duckdb/2.0/clients/java/troubleshoot.html
Encodings Extension 11868
The encodings extension adds support for reading CSVs using more than 1,000 character encodings. For a complete list of supported encodings, see All Supported Encodings . For detailed information on character encoding, see the ICU data repo ... 737 iso-8859_7-1987 738 iso-8859_7-2003 739 ISO8859_8 740 iso-8859_8-1999 741 ISO8859_9 742 iso-8859_9-1999 743 iso89 744 java-ASCII-1.3_P 745 java-Big5-1.3_P 746 java-Cp037-1.3_P 747 java-Cp1006-1.3_P 748 java-Cp1025-1.3_P 749 java-Cp1026-1.3_P 750 ... java-Cp1097-1.3_P 751 java-Cp1098-1.3_P 752 java-Cp1112-1.3_P 753 java-Cp1122-1.3_P 754 java-Cp1123-1.3_P 755 java-Cp1124-1.3_P ... 756 java-Cp1250-1.3_P 757 java-Cp1251-1.3_P 758 java-Cp1252-1.3_P 759 java-Cp1253-1.3_P 760 java-Cp1254-1.3_P 761 java-Cp1255-1.3_P ...
https://man.mtool.work/duckdb/2.0/core_extensions/encodings.html
Write User Defined Functions 10908
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 ... e 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 matches the number of arguments and, for primitives, their type: withFunction ... on() , and withDoubleFunction() take a unary or binary operator over INTEGER , BIGINT , or DOUBLE and avoid boxing. import java.sql.Connection; import java.sql.DriverManager; import org.duckdb.DuckDBFunctions; try (Connection conn = DriverManager.get ... Connection("jdbc:duckdb:")) { DuckDBFunctions.scalarFunction() .withName("java_add_one") .withParameter(int.class) .withReturnType(int.class) .withIntFunction(x -> x + 1) .register(conn); } SELECT java ...
https://man.mtool.work/duckdb/2.0/clients/java/functions.html
Run Queries 10807
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 ... produce results (e.g., SELECT ). Below are two examples. See also the JDBC Statement and ResultSet documentations. import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; Connection conn = Dri ... tln(rs.getInt(3)); } } stmt.close(); jeans 1 hammer 2 DuckDB also supports prepared statements as per the JDBC API: import java.sql.PreparedStatement; try (PreparedStatement stmt = conn.prepareStatement("INSERT INTO items VALUES (?, ?, ?);")) { stmt. ... composite column types such as LIST , STRUCT , MAP , UNION , and ENUM . The JDBC driver maps each of these to an idiomatic Java object. Read the values from a ResultSet with getObject , which returns the following types: DuckDB type Java type returne ...
https://man.mtool.work/duckdb/2.0/clients/java/querying.html
Java (JDBC) Client 10504
Installation To use the DuckDB Java (JDBC) client, visit the Java installation page . The latest stable version of the DuckDB Java (JDBC) client is 2.0.0. The DuckDB Java (JDBC) client lets Java applications query DuckDB through the standar ... covers installation; the other pages in this section cover connecting and each feature in detail. Installation The DuckDB Java JDBC API can be installed from Maven Central . Please see the installation page for details. Tip To try features before th ... iver are published as SNAPSHOT versions to DuckDB's snapshot repository at https://duckdb-staging.duckdb.org/duckdb/duckdb-java/maven . This is an object storage repository with no browseable web page; it is consumed directly by Maven. Add the reposi ... preview builds page for a full Maven example. Basic API Usage DuckDB's JDBC API implements the main parts of the standard Java Database Connectivity (JDBC) API, version 4.1. Describing JDBC is beyond the scope of this page, see the official document ...
https://man.mtool.work/duckdb/2.0/clients/java/overview.html
Deploy as Native Image 10134
Overview The JDBC driver runs inside GraalVM Native Image executables. Graal Native Image compiles a Java application ahead of time into a standalone binary that starts in milliseconds and requires no JVM on the target machine, which suits ... ip this metadata. For those versions, generate it by running the application once on the JVM with the tracing agent : bash java -agentlib:native-image-agent=config-output-dir=⟨config_dir⟩ -cp ⟨classpath⟩ ⟨MainClass⟩ Next, pass the directory to the bu ... FileDirectories or under META-INF/native-image in your own project: { "resources": { "includes": [ { "pattern": "libduckdb_java\\.so_linux_amd64" } ] } } The bundled library names are libduckdb_java.so_linux_amd64 , libduckdb_java.so_linux_arm64 , li ... bduckdb_java.so_osx_universal , and libduckdb_java.so_windows_amd64 . Name the one for your target platform explicitly. A wildcard matc ...
https://man.mtool.work/duckdb/2.0/clients/java/deploy_native_image.html
Import Data 8551
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 ... nally, the schema and catalog it is applied to. The Appender is flushed when the close() method is called. Example: import java.sql.DriverManager; import org.duckdb.DuckDBConnection; DuckDBConnection conn = (DuckDBConnection) DriverManager.getConnect ... ppender.append("hello"); // its VARCHAR value appender.endUnion(); appender.endRow(); } For a LIST or ARRAY column, pass a Java array as a single value, optionally with a boolean null mask where true marks the corresponding element as NULL : try (var ... nd(new int[] {4, 5}, new boolean[] {false, true}); // second element is NULL appender.endRow(); } For a MAP column, pass a Java Map as a single value; each entry is written as a key/value pair, and a null map is appended as SQL NULL . The following r ...
https://man.mtool.work/duckdb/2.0/clients/java/data_import.html
Handle Results 8147
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 ... ns. Arrow Methods The DuckDB result set integrates with Apache Arrow through the Java Arrow bindings . A DuckDBResultSet can export its rows as an Arrow stream for consumption by Arrow-based tools, and an Arr ... type signatures. Arrow Export The following example exports an Arrow stream from a query result and consumes it using the Java Arrow bindings. Each batch is loaded in turn, and its vectors are read from the VectorSchemaRoot . import org.apache.arrow ... emaRoot().getVector("generate_series")); } } } 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 address ...
https://man.mtool.work/duckdb/2.0/clients/java/result_handling.html
Profile and Monitor 8114
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 ... o be called from a separate thread and exposes getPercentage() , getRowsProcessed() , and getTotalRowsToProcess() . import java.sql.DriverManager; import java.sql.SQLException; import java.util.concurrent.CompletableFuture; import org.duckdb.DuckDBCo ... lerPrintFormat.JSON); System.out.println(profile); } Memory Monitoring with JFR On a JFR-capable JVM , the driver can emit Java Flight Recorder events describing DuckDB's internal memory usage, so that any JFR-aware tool — JDK Mission Control, the jf ... R-capable JVM: OpenJDK and HotSpot 11 and later include JFR. Amazon Corretto 8, OpenJDK 8u272 and later, and several other Java 8 distributions include the JFR backport (the jdk.jfr package). On a JVM without jdk.jfr , such as some stripped Java 8 bu ...
https://man.mtool.work/duckdb/2.0/clients/java/profiling.html
Connect 7828
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 ... ch a remote DuckDB server over Quack . Opening a Connection In JDBC, database connections are created through the standard java.sql.DriverManager class. On modern JVMs the driver registers itself with the DriverManager automatically when the JDBC JAR ... is on the classpath (through Java's service-provider mechanism ), so no setup is needed. If that does not happen for some reason, load the DuckDBDriver clas ... 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.DriverManager; Connection conn = DriverManager.getConnection("jdbc:duckdb:"); To use DuckD ...
https://man.mtool.work/duckdb/2.0/clients/java/connecting.html
PREV 1 2 3 NEXT
DuckDB 2.0 Documentation / man.mtool.work