⌘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 12 for Action (0.002 sec.)
Editing 12611
The linenoise-based CLI editor is available for macOS, Linux and Windows. DuckDB's CLI uses a line-editing library based on linenoise , which has shortcuts that are based on Emacs mode of readline . Below is a list of available commands. Yo ... u can also view these shortcuts from within the CLI using .help shortcuts . Moving Key Action Left Move back a character Right Move forward a character Up Move up a line. When on the first line, move to previous hist ... e to end of line Ctrl + F Move forward a character Alt + Left Move back a word Alt + Right Move forward a word History Key Action Ctrl + P Move to previous history entry Ctrl + N Move to next history entry Ctrl + R Reverse search the history Ctrl + S F ... story entry Ctrl + Down Move to last history entry Alt + N Search the history Alt + P Search the history Changing Text Key Action Backspace Delete previous character Delete Delete next character Ctrl + D Delete next character. When buffer is empty, end ...
https://man.mtool.work/duckdb/2.0/clients/cli/editing.html
MERGE INTO Statement 11550
The MERGE INTO statement is an alternative to INSERT INTO ... ON CONFLICT that doesn't need a primary key since it allows for a custom match condition. This is a very useful alternative for upserting use cases ( INSERT + UPDATE ) when the d ... lete condition WHEN MATCHED AND people.salary > 100_000.0 THEN DELETE WHEN NOT MATCHED THEN INSERT BY NAME RETURNING merge_action, *; merge_action id name salary UPDATE 3 Sarah 89000.0 DELETE 1 John 105000.0 In some cases, you may want to perform a dif ... ferent action specifically if the source doesn't meet a condition. For example, if we expect that data that is not present on the source ... t USING (SELECT 1 AS id) source USING (id) WHEN MATCHED THEN UPDATE WHEN NOT MATCHED BY SOURCE THEN DELETE RETURNING merge_action, *; merge_action id UPDATE 1 DELETE 2 There is also the possibility of specifying WHEN NOT MATCHED BY TARGET . However, th ...
https://man.mtool.work/duckdb/2.0/sql/statements/merge_into.html
Information Schema 10099
The views in the information_schema are SQL-standard views that describe the catalog entries of the database. These views can be filtered to obtain information about a specific column or table. DuckDB's implementation is based on PostgreSQL ... ision If data_type identifies a date, time, timestamp, or interval type, this column contains the (declared or implicit) fractional seconds precision of the type for this column, that is, the number of decimal digits maintained following the decimal po ... int in the seconds value. No fractional seconds are currently supported in DuckDB. For all other data types, this column is NULL . INTEGER 0 is_generated ALWAYS ... of the foreign key constraint. Always NONE . VARCHAR NONE update_rule Update rule of the foreign key constraint. Always NO ACTION . VARCHAR NO ACTION delete_rule Delete rule of the foreign key constraint. Always NO ACTION . VARCHAR NO ACTION schemata : ...
https://man.mtool.work/duckdb/2.0/sql/meta/information_schema.html
Appender 9852
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 ... mns=["kind"]) appender.append_row("login") appender.append_row("logout") appender.flush() Updates, Upserts and Deletes The action argument picks the statement: "insert" (the default), "upsert" , "update" or "delete" . An upsert inserts new rows and upd ... RIMARY KEY, qty INTEGER)") con.execute("INSERT INTO stock VALUES ('widget', 3), ('gadget', 5)") with con.appender("stock", action="upsert") as appender: appender.append_row("widget", 10) appender.append_row("gizmo", 1) with con.appender("stock", action ... ="update", key=["sku"]) as appender: appender.append_row("gadget", 0) with con.appender("stock", action="delete", key=["sku"]) as appender: appender.append_row("gizmo") print(con.sql("SELECT * FROM stock ORDER BY sku").fetchal ...
https://man.mtool.work/duckdb/2.0/clients/python/appender.html
Merge Statement for SCD Type 2 8914
This is a practical, step-by-step guide to using DuckDB's MERGE statement (introduced in v1.4.0) to perform upserts and build Slowly Changing Dimension Type 2 (SCD Type 2) tables . Type 2 SCDs let you keep full historical versions of record ... HED BY TARGET New row (insert) WHEN NOT MATCHED BY SOURCE Row disappeared → soft-delete/expire old version RETURNING merge_action Optional: shows what happened to each row (INSERT/UPDATE/DELETE) Build an SCD Type 2 Dimension Table We'll track ducks and ... following code blocks to follow this guide. Step 1: Create the Incoming (source) Table This table represents today's transactional data. CREATE TABLE IF NOT EXISTS incoming_ducks ( duck_id INTEGER, duck_name VARCHAR, breed VARCHAR, location VARCHAR, b ... ERVAL '1 day', NULL, true); Step 2: Create the Master (target) Table This table represents the type 2 SCD data (i.e., transaction data with history). CREATE TABLE IF NOT EXISTS master_ducks ( record_id INTEGER PRIMARY KEY, duck_id INTEGER NOT NULL, duc ...
https://man.mtool.work/duckdb/2.0/guides/sql_features/merge.html
INSERT Statement 8667
The INSERT statement inserts new data into a table. Examples Insert the values 1, 2, 3 into tbl : INSERT INTO tbl VALUES (1), (2), (3); Insert the result of a query into a table: INSERT INTO tbl SELECT * FROM other_tbl; Insert values into t ... statement will be filled with the default value. ON CONFLICT Clause An ON CONFLICT clause can be used to perform a certain action on conflicts that arise from UNIQUE or PRIMARY KEY constraints. An example for such a conflict is shown in the following e ... 00 INSERT INTO tbl VALUES (1, 20, 900) ON CONFLICT (j) DO UPDATE SET k = 5 * EXCLUDED.k; i j k 1 20 4500 The DO UPDATE SET action may be further restricted with a WHERE clause, which is checked for each conflicting row. Conflicting rows that do not mee ... t the condition are left unchanged. This WHERE clause is part of the DO UPDATE SET action and must appear after it, as shown below. INSERT INTO tbl VALUES (1, 40, 700) ON CONFLICT (i) DO UPDATE SET k = 2 * EXCLUD ...
https://man.mtool.work/duckdb/2.0/sql/statements/insert.html
Requirements 7994
DuckDB is designed to be portable and has very few runtime dependencies. Still, there are a few requirements to be aware of before installing or running DuckDB. Supported Platforms DuckDB officially supports Linux, macOS and Windows on both ... er distributed for the linux_amd64_gcc4 platform. Most mainstream Linux distributions ship with glibc 2.28 or newer, so no action is needed on these systems. If you need to run DuckDB on a system with an older glibc, you can build DuckDB from source ag ...
https://man.mtool.work/duckdb/2.0/operations_manual/installing_duckdb/requiremen...
CREATE TRIGGER Statement 7605
New The CREATE TRIGGER feature was introduced in DuckDB 2.0. The CREATE TRIGGER statement registers a trigger: a set of SQL statements that run automatically in response to INSERT , UPDATE , or DELETE events on a table. Examples Record ever ... s The triggers defined in the catalog can be listed with the duckdb_triggers() function : SELECT trigger_name, table_name, action_timing, event_manipulation, for_each FROM duckdb_triggers(); Dropping Triggers A trigger is dropped with DROP TRIGGER . Th ...
https://man.mtool.work/duckdb/2.0/sql/statements/create_trigger.html
CREATE TABLE Statement 7340
The CREATE TABLE statement creates a table in the catalog. Examples Create a table with two integer columns ( i and j ): CREATE TABLE t1 (i INTEGER, j INTEGER); Create a table with a primary key: CREATE TABLE t1 (id INTEGER PRIMARY KEY, j V ... ISTS syntax will only proceed with the creation of the table if it does not already exist. If the table already exists, no action will be taken and the existing table will remain in the database. Create a table with two integer columns ( i and j ) only ...
https://man.mtool.work/duckdb/2.0/sql/statements/create_table.html
Release Cycle 7216
This document outlines the DuckDB and core extension release cycle framework. It is intended for developers working on DuckDB extensions to better understand the underlying processes. Overview DuckDB follows Semantic Versioning ( v<MAJOR>.< ... be able to test with latest DuckDB main while maintaining ability to do releases for vx.y.<z+n> (including vx.y.z itself) Actions: Create branch vx.y-codename from a commit on main between HEAD of main and the commit in the DuckDB vx.y.z config file. ... or Feature-freeze phase Reasons: Whenever a feature needs to be merged that is not eligible for merging into vx.<y+1>.0 . Actions: Create vx.<y+1>-codename branch from main Switch Three branch -> Two branch or Two branch -> Single branch When: part of ... transition from Feature Freeze -> Mid-cycle Action: happens automatically ( vx.y-codename becomes inactive by definition) Single branch extensions require manual version upd ...
https://man.mtool.work/duckdb/2.0/dev/release_cycle.html
PREV 1 2 NEXT
DuckDB 2.0 Documentation / man.mtool.work