Results of 1 - 10 of about 64 for Replace (0.002 sec.)
- Regular Expressions 13597
- DuckDB offers pattern matching operators ( LIKE , SIMILAR TO , GLOB ), as well as support for regular expressions via functions. Regular Expression Syntax DuckDB uses the RE2 library as its regular expression engine. For the regular express
.... regexp_matches(string, pattern[, options]) Returns true if string contains the regexp pattern , false otherwise. regexp_replace(string, pattern, replacement[, options]) If string contains the regexp pattern , replaces the matching part with replaceme...nt . By default, only the first occurrence is replaced. A set of optional options , including the global flag g , can be set. regexp_split_to_array(string, regex[, options]) Al...rwise. A set of optional options can be set. | | Example | regexp_matches('anabanana', '(an)*') | | Result | true | regexp_replace(string, pattern, replacement[, options]) | Description | If string contains the regexp pattern , replaces the matching par... - https://man.mtool.work/duckdb/2.0/sql/functions/regular_expressions.html
- AWS Extension 10209
- The aws extension adds functionality, e.g., authentication, on top of the httpfs extension's S3 capabilities , using the AWS SDK. Installing and Loading The aws extension will be transparently autoloaded on first use from the official exten
...fetching credentials using mechanisms provided by the AWS SDK. For example, to use the AWS SDK default provider: CREATE OR REPLACE SECRET secret ( TYPE s3, PROVIDER credential_chain ); To query a file using the above secret, simply query any s3:// prefi...keyword. This takes a semicolon-separated list ( a;b;c ) of providers that will be tried in order. For example: CREATE OR REPLACE SECRET secret ( TYPE s3, PROVIDER credential_chain, CHAIN 'env;config' ); The possible values for CHAIN are the following:...automatically fetched config. For example, to automatically load credentials, and then override the region, run: CREATE OR REPLACE SECRET secret ( TYPE s3, PROVIDER credential_chain, CHAIN config, REGION '⟨eu-west-1⟩' ); Selecting a Profile To load cred... - https://man.mtool.work/duckdb/2.0/core_extensions/aws.html
- CASE Expression 10036
- The CASE expression performs a switch based on a condition. The basic form is identical to the ternary condition used in many programming languages ( CASE WHEN cond THEN a ELSE b END is equivalent to cond ? a : b ). With a single condition
...this can be expressed with IF(cond, a, b) . CREATE OR REPLACE TABLE integers AS SELECT unnest([1, 2, 3]) AS i; SELECT i, CASE WHEN i > 2 THEN 1 ELSE 0 END AS test FROM integers; i test...r any of the conditions returns true for a single tuple, the corresponding expression is evaluated and returned. CREATE OR REPLACE TABLE integers AS SELECT unnest([1, 2, 3]) AS i; SELECT i, CASE WHEN i = 1 THEN 10 WHEN i = 2 THEN 20 ELSE 0 END AS test F...optional. If no ELSE clause is provided and none of the conditions match, the CASE expression will return NULL . CREATE OR REPLACE TABLE integers AS SELECT unnest([1, 2, 3]) AS i; SELECT i, CASE WHEN i = 1 THEN 10 END AS test FROM integers; i test 1 10... - https://man.mtool.work/duckdb/2.0/sql/expressions/case.html
- CREATE VIEW Statement 9850
- The CREATE VIEW statement defines a new view in the catalog. Examples Create a simple view: CREATE VIEW view1 AS SELECT * FROM tbl; Create a view or replace it if a view with that name already exists: CREATE OR REPLACE VIEW view1 AS SELECT
...42; Create a view and replace the column names: CREATE VIEW view1 (a) AS SELECT 42; New The SECURE VIEW feature was introduced in DuckDB 2.0. Create a s...The view is not physically materialized. Instead, the query is run every time the view is referenced in a query. CREATE OR REPLACE VIEW is similar, but if a view of the same name already exists, it is replaced. CREATE SECURE VIEW defines a view that doe... - https://man.mtool.work/duckdb/2.0/sql/statements/create_view.html
- CREATE MACRO Statement 9663
- The CREATE MACRO statement defines a named, callable SQL expression as a database schema object. Macros may declare parameters, which can be referenced by its expression. Once a macro is created, it may be called by referencing its name and
...ue. The CREATE FUNCTION statement is an alias for CREATE MACRO . The simplified syntax for creating a macro is: CREATE [OR REPLACE] [TEMPORARY] MACRO [IF NOT EXISTS] ⟨identifier⟩( [⟨parameters⟩] ) AS [TABLE] ⟨expression⟩; The identifier consists of the...acro will be stored in the database. The optional TEMPORARY keyword indicates that the macro is not to be persisted. An OR REPLACE clause may occur immediately after the CREATE keyword, which causes an existing macro with the same name (within the schem...a) to be overwritten. Without OR REPLACE such an attempt will fail with a Macro Function already exists error. An IF NOT EXISTS clause may occur immediately before... - https://man.mtool.work/duckdb/2.0/sql/statements/create_macro.html
- CREATE TYPE Statement 9476
- The CREATE TYPE statement defines a new type in the catalog. Examples Create a simple ENUM type: CREATE TYPE mood AS ENUM ('happy', 'sad', 'curious'); Create a simple STRUCT type: CREATE TYPE many_things AS STRUCT(k INTEGER, l VARCHAR); Cre
...type: CREATE TYPE one_thing AS UNION(number INTEGER, string VARCHAR); Create a type alias: CREATE TYPE x_index AS INTEGER; Replace an existing type: CREATE OR REPLACE TYPE mood AS ENUM ('cheerful', 'gloomy'); Syntax The CREATE TYPE clause defines a new...data type available to this DuckDB instance. Use the OR REPLACE modifier to redefine a type that already exists. These new types can then be inspected in the duckdb_types table . Limitat... - https://man.mtool.work/duckdb/2.0/sql/statements/create_type.html
- Friendly SQL 9031
- DuckDB offers several advanced SQL features and syntactic sugar to make SQL queries more concise. We refer to these colloquially as “friendly SQL”. Several of these features were first introduced by DuckDB, while some are inspired by other
...example, and an abstract illustration for 12 friendly SQL features. Clauses Creating tables and inserting data: CREATE OR REPLACE TABLE : avoid DROP TABLE IF EXISTS statements in scripts. CREATE TABLE ... AS SELECT (CTAS) : create a new table from the...OR IGNORE INTO ... : insert the rows that do not result in a conflict due to UNIQUE or PRIMARY KEY constraints. INSERT OR REPLACE INTO ... : insert the rows that do not result in a conflict due to UNIQUE or PRIMARY KEY constraints. For those that resul...t in a conflict, replace the columns of the existing row to the new values of the to-be-inserted row. Describing tables and computing statistics: D... - https://man.mtool.work/duckdb/2.0/sql/dialect/friendly_sql.html
- Star Expression 9031
- Syntax The * expression can be used in a SELECT statement to select all columns that are projected in the FROM clause. SELECT * FROM tbl; TABLE.* and STRUCT.* The * expression can be prepended by a table name to select only columns from tha
...ery spelling. The two keywords are interchangeable and may be mixed in the same query. sql SELECT * EXCEPT (col) FROM tbl; REPLACE Clause REPLACE allows you to replace specific columns by alternative expressions. SELECT * REPLACE (col1 / 1_000 AS col1,...col2 / 1_000 AS col2) FROM tbl; RENAME Clause RENAME allows you to replace specific columns. SELECT * RENAME (col1 AS height, col2 AS width) FROM tbl; Column Filtering via Pattern Matching Operator...20), (3, NULL); SELECT min(COLUMNS(*)), count(COLUMNS(*)) FROM numbers; id number id number 1 10 3 2 SELECT min(COLUMNS(* REPLACE (number + id AS number))), count(COLUMNS(* EXCLUDE (number))) FROM numbers; id min((number + id)) id 1 11 3 COLUMNS expres... - https://man.mtool.work/duckdb/2.0/sql/expressions/star.html
- Functions 9031
- Function Syntax Function Chaining via the Dot Operator DuckDB supports the dot syntax for function chaining. This allows the function call fn(arg1, arg2, arg3, ...) to be rewritten as arg1.fn(arg2, arg3, ...) . For example, take the followi
...ng use of the replace function : SELECT replace(goose_name, 'goose', 'duck') AS duck_name FROM unnest(['African goose', 'Faroese goose', 'Hungar...ian goose', 'Pomeranian goose']) breed(goose_name); This can be rewritten as follows: SELECT goose_name.replace('goose', 'duck') AS duck_name FROM unnest(['African goose', 'Faroese goose', 'Hungarian goose', 'Pomeranian goose']) breed...s and Arrays String literals and array access operations can be used with function chaining directly: SELECT 'hello world'.replace(' ', '_'); SELECT m[1].map_entries() FROM (VALUES ([MAP {'hello': 42}, MAP {'world': 42}])) t(m); To apply function chaini... - https://man.mtool.work/duckdb/2.0/sql/functions/overview.html
- CREATE TABLE Statement 8744
- 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
...ile.csv'); Allow temporary tables to off-load excess memory to disk: SET temp_directory = '/path/to/directory/'; CREATE OR REPLACE The CREATE OR REPLACE syntax allows a new table to be created or for an existing table to be overwritten by the new table....able and then creating the new one. Create a table with two integer columns (i and j) even if t1 already exists: CREATE OR REPLACE TABLE t1 (i INTEGER, j INTEGER); IF NOT EXISTS The IF NOT EXISTS syntax will only proceed with the creation of the table i...e following: CREATE TABLE flights AS FROM 'https://duckdb.org/data/flights.csv'; The CTAS construct also works with the OR REPLACE modifier, yielding CREATE OR REPLACE TABLE ... AS statements: CREATE OR REPLACE TABLE flights AS FROM 'https://duckdb.org/... - https://man.mtool.work/duckdb/2.0/sql/statements/create_table.html
DuckDB 2.0 Documentation / man.mtool.work