Results of 1 - 10 of about 29 for exception (0.002 sec.)
- Python Function API 14162
- You can create a DuckDB user-defined function (UDF) from a Python function so it can be used in SQL queries. Similarly to regular functions , they need to have a name, a return type and parameter types. Creating Functions To register a Pyth
...l("SELECT add_one(41)").fetchall()) [(42,)] UDFs need NumPy. Without the numpy package, create_function raises InvalidInputException: 'numpy' is required for this operation, but it wasn't installed . The signature is create_function(name, function, parame...ters=None, return_type=None, *, type=..., null_handling=..., exception_handling=..., side_effects=False) . The last four parameters are keyword only, and a value they do not accept raises a Typ...handled as NULL -in NULL -out. Users can specify a desired behavior for NULL values by setting null_handling = 'special' . exception_handling (optional): By default, when an exception is thrown from the Python function, the query fails with an error that... - https://man.mtool.work/duckdb/2.0/clients/python/function.html
- Appender 12416
- Use an appender to insert rows that your Python code produces. It collects rows and writes them together in one SQL statement; this is called flushing. The with block below flushes on successful exit: import duckdb con = duckdb.connect() co
...n() , and otherwise commits by itself. A flush with no rows does nothing. A with block flushes on successful exit. When an exception leaves the block, the buffered rows are discarded and the exception propagates. Outside a with block, call flush() to writ...incorrect column counts, unsupported statement types, RETURNING clauses and SQL parameter placeholders such as ? raise an exception at creation. These errors leave the transaction usable. Cast errors and constraint violations raise an exception during fl...flush. Finish the result or wait for the other call, then call flush() again. Other failures discard the rows and raise an exception. An interrupted flush inside your transaction keeps its buffered rows but aborts the transaction. Roll back before retryin... - https://man.mtool.work/duckdb/2.0/clients/python/appender.html
- Write User Defined Functions 11257
- 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
...Handling Type and value errors raised while a callback reads its inputs or writes its result throw DuckDBFunctions.FunctionException , an unchecked RuntimeException . An out-of-range row or column index throws IndexOutOfBoundsException . Registration-time...problems, such as an undefined return type or an invalid type declaration, throw SQLException . Vectorized Scalar Functions The examples above process one value per call. To process a whole batch of rows at once, reg...DBTableFunction<Integer, AtomicBoolean, Object>() { @Override public Integer bind(DuckDBTableFunctionBindInfo info) throws Exception { info.addResultColumn("col1", Integer.TYPE) .addResultColumn("col2", String.class); DuckDBValue param = info.getParameter... - https://man.mtool.work/duckdb/2.0/clients/java/functions.html
- Troubleshoot 9267
- 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
...ot 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.SQLException: No suitable driver found for jdbc:duckdb: at java.sql/java.sql.DriverManager.getCo...Manager.getConnection(DriverManager.java:252) ... And when trying to load the class manually, it may result in this error: Exception in thread "main" java.lang.ClassNotFoundException: org.duckdb.DuckDBDriver at java.base/jdk.internal.loader.BuiltinClassLo...uchMethodError When Opening a Connection In a GraalVM Native Image executable, opening the first connection may fail with: Exception in thread "main" java.lang.ExceptionInInitializerError ... Caused by: java.lang.NoSuchMethodError: ⟨class and method⟩ at c... - https://man.mtool.work/duckdb/2.0/clients/java/troubleshoot.html
- Deploy 8223
- Overview Deploying DuckDB-Wasm means serving its components so that the browser can fetch and instantiate them. This page describes each component a deployment needs to serve, how the worker and WebAssembly variants relate, how extensions a
...hree different WebAssembly feature sets: mvp targets the WebAssembly 1.0 (MVP) spec eh targets WebAssembly with Wasm-level exception handling added, which improves performance coi targets WebAssembly with exception handling and threading, which enables pa... - https://man.mtool.work/duckdb/2.0/clients/wasm/deploying_duckdb_wasm.html
- Using fsspec Filesystems 8223
- 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
...n 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... - https://man.mtool.work/duckdb/2.0/guides/python/filesystems.html
- jemalloc 8108
- On supported platforms, DuckDB replaces the system's memory allocator with jemalloc . jemalloc is statically linked into DuckDB and cannot be installed or loaded during runtime. For technical reasons, we used to distribute jemalloc as an ex
...malloc depends on the operating system. Linux 64-bit Linux distributions of DuckDB ship with jemalloc by default (with the exception of builds for musl-based distributions). To disable jemalloc , build DuckDB from source and set the BUILD_JEMALLOC flag to... - https://man.mtool.work/duckdb/2.0/internals/jemalloc.html
- JSON Type 7994
- DuckDB supports json via the JSON logical type. For example: SELECT '[1, null, {"key": "value"}]'::JSON; [1, null, {"key": "value"}] Logically, the JSON type is similar to a VARCHAR , but with the restriction that it must be valid JSON. Phy
...ested types as shown in the example, but also for non-nested types: SELECT '2023-05-12'::DATE::JSON; "2023-05-12" The only exception to this behavior is the cast from VARCHAR to JSON , which does not alter the data, but instead parses and validates the co... - https://man.mtool.work/duckdb/2.0/data/json/json_type.html
- Typecasting 7994
- Typecasting is an operation that converts a value in one particular data type to the closest corresponding value in another data type. Like other SQL engines, DuckDB supports both implicit and explicit typecasting. Explicit Casting Explicit
...sting Operations Matrix Values of a particular data type cannot always be cast to any arbitrary target data type. The only exception is the NULL value – which can always be converted between types. The following matrix describes which conversions are supp...re added by the system only where the conversion is generally lossless, so they are also safe to reverse, with the notable exception of casts from wide integer or DECIMAL types to FLOAT or DOUBLE , which can lose precision. Explicit-only casts may lose in... - https://man.mtool.work/duckdb/2.0/sql/data_types/typecasting.html
- S3 Express One 7880
- In late 2023, AWS announced the S3 Express One Zone , a high-speed variant of traditional S3 buckets. DuckDB can read S3 Express One buckets using the httpfs extension . Credentials and Configuration The configuration of S3 Express One buck
...ets is similar to regular S3 buckets with one exception: you must specify the endpoint according to the following pattern: s3express-⟨availability_zone⟩.⟨region⟩.amazonaws.com wh... - https://man.mtool.work/duckdb/2.0/guides/network_cloud_storage/s3_express_one.ht...
DuckDB 2.0 Documentation / man.mtool.work