Results of 1 - 10 of about 15 for raise (0.001 sec.)
- Appender 15082
- 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
...ns duplicate keys, an upsert keeps one row per key value, including NULL ; an update applies one input row; and MERGE INTO raises an error. Custom Statements con.query_appender runs your SQL statement when you flush. Declare the appended columns as a...alid SQL, 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 except...ion during flush() . A flush that raises because an earlier result is still open or another call is running on the connection keeps its buffered rows, and so does... - https://man.mtool.work/duckdb/2.0/clients/python/appender.html
- Integration with PyTorch 8917
- PyTorch tensors can be built from DuckDB query results by exporting each result batch as Apache Arrow . This pattern is useful when training or serving models on Parquet data because DuckDB can filter and project the input before the batche
...batches instead of materializing the full result in memory at once. While the loop holds the reader, other queries on con raise a ResourceInUseException ; a loop that runs a query per batch needs a cursor from con.cursor() . To get the whole result a... - https://man.mtool.work/duckdb/2.0/guides/python/pytorch.html
- DROP Statement 8917
- The DROP statement removes a catalog entry added previously with the CREATE command. Examples Delete the table with the name tbl : DROP TABLE tbl; Drop the view with the name view1 ; do not throw an error if the view does not exist: DROP VI
...; CREATE TABLE myschema.t1 (i INTEGER); DROP SCHEMA myschema CASCADE; The following dependencies are tracked and thus will raise an error if the user tries to drop the depending object without the CASCADE modifier. Depending object type Dependent obje... - https://man.mtool.work/duckdb/2.0/sql/statements/drop.html
- Export to Apache Arrow 8533
- All results of a query can be exported to an Apache Arrow Table using the to_arrow_table function. Alternatively, results can be returned as a RecordBatchReader using the to_arrow_reader function and results can be read one batch at a time.
...d warn with a UserWarning , and the reader does not stream. While a reader is partly read, other queries on its connection raise a ResourceInUseException . Read the reader to the end or close it first, or run the other queries on a cursor from con.cur... - https://man.mtool.work/duckdb/2.0/guides/python/export_arrow.html
- Pivot Internals 8533
- PIVOT Pivoting is implemented as a combination of SQL query re-writing and a dedicated PhysicalPivot operator for higher performance. Each PIVOT is implemented as set of aggregations into lists and then the dedicated PhysicalPivot operator
...d, DuckDB instead uses filtered aggregates. The list-based approach materializes all values in memory, so you can lower or raise pivot_filter_threshold to trade off time against memory usage. UNPIVOT Internals Unpivoting is implemented entirely as rew... - https://man.mtool.work/duckdb/2.0/internals/pivot.html
- Reading Multiple Files 8342
- DuckDB can read multiple files of different types (CSV, Parquet, JSON files) at the same time using either the glob syntax, or by providing a list of files to read. See the combining schemas page for tips on reading files with different sch
...rquet data. To read those files, supply their filenames explicitly. If the directory contains no matching files, the query raises an error. Directory paths do not change how schemas are combined. When files have different columns, use union_by_name =...et('test/*.parquet'); Handling Patterns That Match No Files If a glob pattern does not match any files, the read functions raise an error: SELECT * FROM read_parquet('test/*.parquet'); IO Error: No files found that match the pattern "test/*.parquet" S... - https://man.mtool.work/duckdb/2.0/data/multiple_files/overview.html
- Securing Quack with a Reverse Proxy 8342
- By default, the Quack server binds to localhost and speaks plain HTTP. See Security for the rationale behind these configurations. For any deployment beyond local-only, the recommended pattern is the same as for any other HTTP-based databas
...will fail mid-INSERT. client_max_body_size 256M; # Long-running queries can sit on the wire between FETCHes for # minutes. Raise the timeouts above nginx's default 60s. proxy_read_timeout 600s; proxy_send_timeout 600s; location / { proxy_pass http://1... - https://man.mtool.work/duckdb/2.0/quack/setup/reverse_proxy.html
- SQL Quirks 8342
- Like all programming languages and libraries, DuckDB has its share of idiosyncrasies and inconsistencies. Some are vestiges of our feathered friend's evolution; others are inevitable because we strive to adhere to the SQL Standard and speci
...identifier but log a warning. ENABLE_IMPLICIT_STRING : convert silently (the previous behavior). DISABLE_IMPLICIT_STRING : raise a binder error instead of converting. SET table_function_identifier_conversion = 'DISABLE_IMPLICIT_STRING';... - https://man.mtool.work/duckdb/2.0/sql/dialect/sql_quirks.html
- Migrating Python Code to DuckDB 2.0 8168
- This page lists what Python code written for DuckDB 1.x must change to run on DuckDB 2.0. Each item gives the 1.x form, the 2.0 form and the page that explains it. For changes outside the Python client, see Migrating to DuckDB v2.0 . Python
...olumn x of t . 2.0: a name is never split at a dot, so "t.x" is one column name, and a query without a column of that name raises a BinderException . Write col("t", "x") . See Column Expression . Dicts with keys that are not strings. 1.x: con.values({...lts. 1.x: other queries on the connection ran while a result was partly read. 2.0: running another query on the connection raises a ResourceInUseException until the result is read to its end or ended with con.complete() or con.abort() , and the next e...: calls from several threads on one connection waited for each other. 2.0: a call while another thread uses the connection raises a ResourceInUseException . Give each thread its own con.cursor() . See Using Connections in Parallel Python Programs . Fa... - https://man.mtool.work/duckdb/2.0/clients/python/migration.html
- Python Function API 7976
- 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
...d_one) print(con.sql("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...., exception_handling=..., side_effects=False) . The last four parameters are keyword only, and a value they do not accept raises a TypeError : name A string representing the unique name of the UDF within the connection catalog. function The Python fu...on the connection that registers the function. While an execute() result of the connection is still open, create_function raises a ResourceInUseException . To unregister a UDF, you can call the remove_function method with the UDF name: con.remove_fun... - https://man.mtool.work/duckdb/2.0/clients/python/function.html
DuckDB 2.0 Documentation / man.mtool.work