Utility functions in DuckDB
The following table lists the utility functions, with a link to the description of each one.
| Function | Description |
|---|---|
Returns the name that the engine gives an expression, as a string. |
|
Makes the query fail when a condition is not true, and otherwise returns |
|
Returns whether the engine can convert a value of one data type to another data type without an explicit cast. |
|
Converts a value to the data type of another value. |
|
Returns |
|
Builds a single value that sorts in the same order as one or more values with the sort orders that you choose. |
|
Returns the name of the engine's own database, which is not the name of the catalog that your query uses. |
|
Returns the name of the engine's own database, which is not the name of an AWS Glue database. |
|
Returns the fixed string |
|
Returns the name of the engine's own default schema, which is not the database that your query uses. |
|
Returns the list of schemas on the engine's search path. |
|
Returns the engine's fixed user name, |
|
Returns the position of an |
|
Returns the value that comes first in the list of values of an |
|
Returns the value that comes last in the list of values of an |
|
Returns a list of the values that an |
|
Returns the values of an |
|
Splits a range of values into bins of equal width and returns the list of their upper bounds, which you can pass to |
|
Fails the query with an error message that you choose. |
|
gen_random_uuid |
Alias of uuid. |
Returns a |
|
Lists the files in Amazon S3 whose paths match a glob pattern. |
|
Returns a 64-bit hash of one or more values. |
|
Returns one of two values, depending on whether a condition is true. |
|
Tests whether a schema of a database is in the search path of the current session. |
|
Builds a data type from a type name and the type's parameters. |
|
Returns |
|
Casts every part of a value that has one data type to another data type, including parts inside nested values. |
|
session_user |
Alias of current_user. |
Returns the statistics that the engine has about an expression when it plans the query. |
|
Identifies the data type of an expression and returns its name, such as |
|
user |
Alias of current_user. |
Returns a random version 4 UUID. |
|
Returns the creation time that is stored in a version 7 UUID. |
|
Returns the version number of a UUID. |
|
uuidv4 |
Alias of uuid. |
Returns a version 7 UUID, which starts with its creation time. |
|
Returns the number of elements in a |
|
Tests whether a |
|
Tests whether a |
|
Returns the value of an object key or an array element from a |
|
Returns the value of an object key in a |
|
Collects the values of a group into a |
|
Collects the key-value pairs of a group into a |
|
Returns the keys of a |
|
Returns the type name of a |
|
Returns the detailed type of a |
|
Returns the release line of open-source DuckDB that the engine is built from. |