⌘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 13 for Macros (0.002 sec.)
CREATE MACRO Statement 14621
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 ... is aligned with the macro's type . Please review the syntax diagram for a more precise and detailed overview of the CREATE MACRO statement. Types of Macros The contexts where a particular macro may be called depends on the data type of its result value ... : * Scalar macros evaluate to a scalar value. For scalar macros, the expression can either be a simple expression, or a scalar subquery. * T ... able macros return a tabular result: when called, they act essentially as table functions and return a table value. Their expression c ...
https://man.mtool.work/duckdb/2.0/sql/statements/create_macro.html
Security 9888
This page covers Quack's security posture end to end: what the server exposes, what stays local, the role of a TLS-terminating reverse proxy, and the authentication / authorization callbacks the server runs on every connection and every que ... for every query. No further filtering happens. Both callbacks can be replaced with user-supplied code, including plain SQL macros. See the examples below. The Callback Contract Two settings hold the name of the function to call as a hook for authentica ... function with the matching arity will work: built-in scalar functions, scalar UDFs registered by another extension, or SQL macros. Authentication takes (VARCHAR, VARCHAR, VARCHAR) , authorization takes (VARCHAR, VARCHAR) . The callbacks run in a fresh, ... \b'); SET GLOBAL quack_authorization_function = 'read_only'; For more involved authorization functions, see the Beyond SQL Macros section. Beyond SQL Macros SQL macros cover most authentication and authorization cases, but a macro body is restricted to ...
https://man.mtool.work/duckdb/2.0/quack/security.html
Casting 8762
Casting refers to the operation of converting a value in a particular data type to the corresponding value in another data type. Casting can occur either implicitly or explicitly. The syntax described here performs an explicit cast. More in ... 42', NULL::INTEGER) AS result; ┌───────┐ │ res │ │ int32 │ ├───────┤ │ 42 │ └───────┘ This function is primarily useful in macros , as it allows you to maintain types. This helps with making generic macros that operate on different types. For example, ...
https://man.mtool.work/duckdb/2.0/sql/expressions/cast.html
LibreDB Studio SQL Editor 8410
LibreDB Studio is an open-source, self-hosted, browser-based SQL editor. It runs as a single server, either via npx , Docker, or a native package, and is reached through the browser rather than installed as a desktop application. LibreDB St ... then click Establish Connection to save it. The connection appears in the sidebar. Expand it to browse the tables, views, macros, and sequences in the database. Open a query tab, write SQL, and run it with Run or Ctrl + Enter ( Cmd + Enter on macOS). ...
https://man.mtool.work/duckdb/2.0/guides/sql_editors/libredb_studio.html
Sharing Macros 8287
DuckDB has a powerful macro mechanism that allows creating shorthands for common tasks. Sharing a Scalar Macro First, we define a macro that pretty-prints a non-negative integer as a short string with thousands, millions, and billions (with ... S x; ┌─────────┐ │ x │ │ varchar │ ├─────────┤ │ 42k │ └─────────┘ Sharing a Table Macro It's also possible to share table macros. For example, we created the checksum macro as follows: duckdb compute_table_checksum.duckdb CREATE MACRO checksum(table_n ...
https://man.mtool.work/duckdb/2.0/guides/snippets/sharing_macros.html
query and query_table Functions 8287
The query_table and query functions enable powerful and more dynamic SQL. The query_table function returns the table whose name is specified by its string argument; the query function returns the table obtained by executing the query specif ... EXECUTE select_from_table('my_table'); i 42 When combined with the COLUMNS expression , we can write very generic SQL-only macros. For example, below is a custom version of SUMMARIZE that computes the min and max of every column in a table: CREATE OR R ... ore flexibility. For example, users who prefer pandas' stack syntax over SQL's UNPIVOT syntax , may use: CREATE OR REPLACE MACRO stack(table_name, index, name, values) AS TABLE FROM query( 'UNPIVOT ' || table_name || ' ON COLUMNS(* EXCLUDE (' || array_ ...
https://man.mtool.work/duckdb/2.0/guides/sql_features/query_and_query_table_func...
Vector Similarity Search Extension 8234
The vss extension is an experimental extension for DuckDB that adds indexing support to accelerate vector similarity search queries using DuckDB's new fixed-size ARRAY type. See the announcement blog post and the “What's New in the Vector S ... r a significant number of updates. Bonus: Vector Similarity Search Joins The vss extension also provides a couple of table macros to simplify matching multiple vectors against each other, so called "fuzzy joins". These are: vss_join(left_table, right_t ... tal_persistence = ⟨bool⟩ configuration option is set to true , see Persistence for more information. The vector join table macros ( vss_join and vss_match ) do not require or make use of the HNSW index. ...
https://man.mtool.work/duckdb/2.0/core_extensions/vss.html
Guides 8164
The guides section contains compact how-to guides that are focused on achieving a single goal. For API references and examples, see the rest of the documentation. Note that there are many tools using DuckDB, which are not covered in the off ... eau How to draw command-line plots with DuckDB and YouPlot Snippets Creating synthetic data Dutch railway datasets Sharing macros Analyzing a Git repository Importing duckbox tables Copying an in-memory database to a file Calculating a database checksu ...
https://man.mtool.work/duckdb/2.0/guides/overview.html
Python DB API 7988
The standard DuckDB Python API provides a SQL interface compliant with the DB-API 2.0 specification described by PEP 249 similar to the SQLite Python API . Connection To use the module, you must first create a DuckDBPyConnection object that ... d, subsequent duckdb.connect calls will create a new connection to the same database, sharing the catalogs (views, tables, macros etc.). Using :memory: without a name will always create a new and separate database instance. Default Connection The duckd ...
https://man.mtool.work/duckdb/2.0/clients/python/dbapi.html
Lambda Functions 7988
DuckDB lambda functions (a.k.a. 'lambdas' or 'lambda expressions') are expressions that define an inline anonymous function. Lambdas are passed as argument to certain list functions , which evaluate the passed lambda expression against its ... annot contain a subquery, table function, and the like. The expression may contain macro invocations. However, only scalar macros are allowed, and only if they do not rely on a subquery. For example, the following are all valid lambda functions: lambda ...
https://man.mtool.work/duckdb/2.0/sql/functions/lambda.html
PREV 1 2 NEXT
DuckDB 2.0 Documentation / man.mtool.work