⌘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 24 for merge (0.004 sec.)
MERGE INTO Statement 13694
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 ... N UPDATE ), and when there is no match, the row can be trivially inserted into the table ( WHEN NOT MATCHED THEN INSERT ). MERGE INTO people USING ( SELECT unnest([3, 1]) AS id, unnest(['Sarah', 'John']) AS name, unnest([95_000.0, 105_000.0]) AS salar ... uses a column that has the same name in the source and destination, the keyword USING can be used in the match condition. MERGE INTO people USING ( SELECT 1 AS id, 98_000.0 AS salary ) AS salary_updates USING (id) WHEN MATCHED THEN UPDATE SET salary ... Sarah 95000.0 Another common pattern is to receive a delete set of rows, which may only contain ids of rows to be deleted. MERGE INTO people USING ( SELECT 1 AS id, ) AS deletes USING (id) WHEN MATCHED THEN DELETE; FROM people ORDER BY id; id name sal ...
https://man.mtool.work/duckdb/2.0/sql/statements/merge_into.html
JSON Processing Functions 11776
JSON Extraction Functions There are two extraction functions, which have their respective operators. The operators can only be used if the string is stored as the JSON logical type. These functions support the same two location notations as ... Normalization Functions The following scalar functions compute, apply and clean up JSON patches. They complement the json_merge_patch function , which applies a RFC 7396 merge patch to a JSON document. For an end-to-end example of using these functio ... onciliation pipeline, see the “Reconciling JSON in DuckDB, One Patch at a Time” blog post . Function Description json_deep_merge(json, patch[, ...]) Recursively merge one or more patch documents into json , applied left to right. Works like json_merge ... eps the original value instead of deleting the key. A SQL NULL patch returns NULL , while a SQL NULL json is ignored. json_merge_patch_diff(json_orig, json_modified) Return the minimal RFC 7396 merge patch such that json_merge_patch(json_orig, patch) ...
https://man.mtool.work/duckdb/2.0/data/json/json_functions.html
Merge Statement for SCD Type 2 11209
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 ... t to know previous values of your primary key data, when it changed and for how long it was in a particular state. Why Use MERGE in DuckDB? Single SQL statement for INSERT , UPDATE , and soft DELETE (upsert and expire). Much cleaner and faster than eq ... le The main/master table you are updating (e.g., master_ducks ) Source table The incoming/new data (e.g., incoming_ducks ) MERGE INTO Specifies the target table USING Specifies the source table/query ON Join condition (usually primary/business key + c ... T MATCHED 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 du ...
https://man.mtool.work/duckdb/2.0/guides/sql_features/merge.html
Writing to Iceberg 10592
The DuckDB iceberg extension supports writing to Iceberg tables when an Iceberg catalog is attached. Writing to a table read directly from storage with iceberg_scan is not supported: the catalog is required to commit the new table metadata. ... ollowing operations when used with a REST Catalog attached: CREATE/DROP SCHEMA CREATE/DROP TABLE INSERT INTO UPDATE DELETE MERGE INTO ALTER TABLE SELECT Since these operations are supported, the following will also work: COPY FROM DATABASE duckdb_db T ... t_name = 'view' WHERE id = 1; DELETE FROM iceberg_catalog.sales.events WHERE event_time < TIMESTAMP '2026-01-01'; They use merge-on-read semantics and write positional deletes, see Limitations for UPDATE and DELETE . MERGE INTO The MERGE INTO statemen ... ve a primary key. You can apply a change set in a single statement, deciding per row whether to insert, update, or delete: MERGE INTO iceberg_catalog.default.people AS target USING ( FROM (VALUES (1, 'John', 105_000.0), (3, 'Sarah', 95_000.0) ) t(id, ...
https://man.mtool.work/duckdb/2.0/core_extensions/iceberg/writing_to_iceberg.htm...
Creating JSON 9057
JSON Creation Functions The following functions are used to create JSON. Function Description to_json(any) Create JSON from a value of any type. Our LIST is converted to a JSON array, and our STRUCT and MAP are converted to a JSON object. j ... , value, ...) Create a JSON object from key , value pairs in the argument list. Requires an even number of arguments. json_merge_patch(json, json) Merge two JSON documents together. Examples: SELECT to_json('duck'); "duck" SELECT to_json([1, 2, 3]); [ ... , 'goose', 123); ["duck",42,"goose",123] SELECT json_object('duck', 42, 'goose', 123); {"duck":42,"goose":123} SELECT json_merge_patch('{"duck": 42}', '{"goose": 123}'); {"duck":42,"goose":123} ...
https://man.mtool.work/duckdb/2.0/data/json/creating_json.html
Analyzing a Git Repository 7989
You can use DuckDB to analyze Git logs using the output of the git log command . Exporting the Git Log We start by picking a character that doesn't occur in any part of the commit log (author names, messages, etc). Since version v1.2.0, Duc ... ROUP BY ALL ORDER BY count DESC LIMIT 20; ┌──────────┬───────┐ │ word │ count │ │ varchar │ int64 │ ├──────────┼───────┤ │ merge │ 12550 │ │ fix │ 6402 │ │ branch │ 6005 │ │ pull │ 5950 │ │ request │ 5945 │ │ add │ 5687 │ │ test │ 3801 │ │ master │ 32 ... │ 1139 │ │ function │ 1088 │ ├──────────┴───────┤ │ 20 rows │ └──────────────────┘ As expected, there are many Git terms ( merge , branch , pull , etc.), followed by terminology related to development ( fix , test / tests , issue , format ). We also s ... f some developers ( mytherin , hawkfish ), which are likely there due to commit messages for merging pull requests (e.g., ”Merge pull request #13776 from Mytherin/expressiondepth” ). Finally, we also see some DuckDB-related terms such as duckdb (shock ...
https://man.mtool.work/duckdb/2.0/guides/snippets/analyze_git_repository.html
Python Client API 7873
Connection class duckdb. Appender Bases: object append_row ( self , * args ) → None Buffer one row, one value per column, each converted as an executemany parameter would be append_rows ( self , rows : object ) → None Buffer each row of an ... r ] ] ] ] = {'array_length': ('json_array_length', 0, ['JSON']), 'contains': ('json_contains', 0, ['JSON', 'JSON']), 'deep_merge': ('json_deep_merge', 0, ['JSON', 'JSON']), 'exists': ('json_exists', 0, ['JSON', 'VARCHAR']), 'extract': ('json_extract', ... , 0, ['JSON', 'VARCHAR']), 'insert': ('json_insert', 0, ['JSON', 'VARCHAR', 'JSON']), 'keys': ('json_keys', 0, ['JSON']), 'merge_patch_diff': ('json_merge_patch_diff', 0, ['JSON', 'JSON']), 'normalize': ('json_normalize', 0, ['JSON']), 'parse': ('json ... . contains ( * args : ValueOrExpr ) → Expression The json_contains function. Arguments: needle. SQL: json_contains . deep_merge ( * args : ValueOrExpr ) → JsonExpr The json_deep_merge function. Arguments: json2. SQL: json_deep_merge . exists ( * args ...
https://man.mtool.work/duckdb/2.0/clients/python/reference/
DuckLake 7823
DuckLake 1.1 was released together with DuckDB 2.0. Read the announcement blog post . The ducklake extension adds support for attaching to databases stored in the DuckLake format . The complete documentation of this extension is available a ... type Named parameter Description catalog VARCHAR no versions BIGINT[] yes older_than TIMESTAMP WITH TIME ZONE yes ducklake_merge_adjacent_files The ducklake_merge_adjacent_files function merges adjacent files in the storage. It returns one row per tab ...
https://man.mtool.work/duckdb/2.0/core_extensions/ducklake.html
CREATE TRIGGER Statement 7823
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 ... F triggers and triggers on views are not supported; a trigger requires a base table. Temporary triggers are not supported. MERGE INTO is not supported on tables with triggers. INSERT ... ON CONFLICT , INSERT OR REPLACE and INSERT OR IGNORE are execute ... d as a merge and therefore fail on tables with UPDATE or DELETE triggers. ON CONFLICT is not yet supported on tables with FOR EACH ROW ...
https://man.mtool.work/duckdb/2.0/sql/statements/create_trigger.html
Release Cycle 7773
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>.< ... bug-fixes. During this phase, patch releases ( vx.y.<z+n> ) may be created from the vx.y-codename branch. The patches are merged into the vx.y-codename branch, and the vx.y-codename branch is frequently merged into main to keep the two in sync. PRs i ... nto DuckDB Bug-fixes for vx.y.<z+n> patch releases are merged into vx.y-codename Features and bug-fixes for vx.<y+1>.0 are merged into main Phase 2: Pre-Release Active Branches main v ... which all subsequent vx.<y+1>.<n> patch releases are released. PRs into DuckDB Bug-fixes for vx.y.<z+1> patch releases are merged into vx.y-codename Features and bug-fixes for vx.<y+1>.0 are merged into vx.<y+1>-codename Features for vx.<y+2>.0 are me ...
https://man.mtool.work/duckdb/2.0/dev/release_cycle.html
PREV 1 2 3 NEXT
DuckDB 2.0 Documentation / man.mtool.work