⌘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 94 for Connect (0.004 sec.)
Relational API 12816
The Relational API builds a query one step at a time from Python. A relation, a DuckDBPyRelation , is a piece of SQL text: the methods of the Transformation and Functions sections return a new relation whose text extends the one they were c ... types, and holds no data. For example, a relation over a billion rows is built at once: import duckdb duckdb_conn = duckdb.connect() rel = duckdb_conn.sql("FROM range(1_000_000_000) t(id) SELECT id, id % 7 AS bucket") print(rel.sql_query()) FROM range(1 ... ata. Printing a relation, or calling show() , also runs it and displays the first rows: import duckdb duckdb_conn = duckdb.connect() rel = duckdb_conn.sql("FROM range(1_000_000_000) t(id) SELECT id, id % 7 AS bucket") rel.filter("bucket = 3").order("id" ... set is the offset() method. To run a query once and keep its rows, call materialize() : import duckdb duckdb_conn = duckdb.connect() duckdb_conn.sql("CREATE TABLE items (id INTEGER)") counted = duckdb_conn.sql("SELECT count(*) AS n FROM items") held = c ...
https://man.mtool.work/duckdb/2.0/clients/python/relational_api.html
CONNECT and DISCONNECT Statements 11958
New Support for the CONNECT and DISCONNECT statements was introduced in DuckDB 2.0. The CONNECT statement routes the current session to a remote database, so that subsequent queries execute on that remote and their results stream back. DISCONNECT ... ONNECT returns the session to the local database. CONNECT is central to using DuckDB as a server : a DuckDB instance can serve its databases over the network, and any other DuckDB ... o it and route queries there. Examples Attach a remote DuckDB server over the Quack protocol , route queries to it, and disconnect again: ATTACH 'quack:server.example.com' AS qk (TOKEN '⟨my_token⟩'); CONNECT qk; SELECT count(*) FROM events; -- executes ... on the server, results stream back DISCONNECT; Connect directly to a remote database using a connection string. For databases other than DuckDB, the connection string m ...
https://man.mtool.work/duckdb/2.0/sql/statements/connect.html
Command Line Arguments 11034
The table below summarizes DuckDB's command line options. To list all command line options, use the command: duckdb -help For a list of dot commands available in the CLI shell, see the Dot Commands page . Argument Description -agent Render ... rce batch I/O -box Set output mode to box -column Set output mode to column -cmd COMMAND Run COMMAND before reading stdin -connect [TYPE[:SECRET]] Connect to a remote database. The default type is quack . A named secret can be provided after the type -c ... he Securing DuckDB page for guidelines on how to set up DuckDB in a secure manner -version Show DuckDB version Serving and Connecting to Remote Databases New The -serve and -connect arguments were introduced in DuckDB 2.0. The -serve argument starts a Q ... :9494 : duckdb -serve To serve a persistent database, provide its path before -serve : duckdb analytics.duckdb -serve The -connect argument connects the CLI to a remote database. Without arguments, it connects to the Quack server on localhost:9494 using ...
https://man.mtool.work/duckdb/2.0/clients/cli/arguments.html
Python API 9819
Installation To use the DuckDB Python client, visit the Python installation page . The latest stable version of the DuckDB Python client is 2.0.0. Installation The DuckDB Python API can be installed using pip : pip install duckdb . Please s ... ").write_csv("out.csv") # Write to a CSV file duckdb.execute("COPY (SELECT 42) TO 'out.parquet'") # Copy to a Parquet file Connection Options Applications can open a new DuckDB connection via the duckdb.connect() method. Using an In-Memory Database When ... DB through duckdb.sql() , it operates on an in-memory database, i.e., no tables are persisted on disk. Invoking the duckdb.connect() method without arguments returns a connection, which also uses an in-memory database: import duckdb con = duckdb.connect ... () con.sql("SELECT 42 AS x").show() Persistent Storage The duckdb.connect(dbname) creates a connection to a persistent database. Any data written to that connection will be persisted, and can be r ...
https://man.mtool.work/duckdb/2.0/clients/python/overview.html
Friendly CLI 9358
Along with our Friendly SQL , we provide friendly CLI features. Dark/Light Mode The CLI automatically detects whether the terminal is using a dark or light background and adjusts syntax highlighting colors accordingly. The mode can also be ... red1 brightred indianred1 ... Dynamic Prompt The default prompt is the following: {max_length:50}{highlight_element:prompt_connect}{setting:connect_name_prefix}{highlight_element:prompt}{setting:current_database_and_schema}{color:reset} D While the sess ... ion is connected to a remote database with CONNECT , {setting:connect_name_prefix} shows the remote database's name (or its URI, e.g., qu ... ack:localhost , for CONNECT '⟨uri⟩' and -connect ); otherwise it is empty. Return the Result of the Last Query Using _ You can use the _ (underscore) ...
https://man.mtool.work/duckdb/2.0/clients/cli/friendly_cli.html
SQL on Apache Arrow 8962
DuckDB can query multiple different types of Apache Arrow objects. DuckDB pushes the filters of a query that it can translate, such as comparisons, into the scan of an Arrow dataset. Arrow tables, record batches, scanners and RecordBatchRea ... stored in local variables can be queried as if they are regular tables within DuckDB. import duckdb import pyarrow as pa # connect to an in-memory database con = duckdb.connect() my_arrow_table = pa.Table.from_pydict({'i': [1, 2, 3, 4], 'j': ["one", "tw ... nto memory. import duckdb import pyarrow as pa import tempfile import pyarrow.parquet as pq import pyarrow.dataset as ds # connect to an in-memory database con = duckdb.connect() my_arrow_table = pa.Table.from_pydict({'i': [1, 2, 3, 4], 'j': ["one", "tw ... ort pyarrow as pa import tempfile import pyarrow.parquet as pq import pyarrow.dataset as ds import pyarrow.compute as pc # connect to an in-memory database con = duckdb.connect() my_arrow_table = pa.Table.from_pydict({'i': [1, 2, 3, 4], 'j': ["one", "tw ...
https://man.mtool.work/duckdb/2.0/guides/python/sql_on_arrow.html
ODBC Extension Functions 8790
odbc_begin_transaction odbc_bind_params odbc_close odbc_commit odbc_connect odbc_copy odbc_create_params odbc_list_data_sources odbc_list_drivers odbc_query odbc_rollback odbc_begin_transaction odbc_begin_transaction(conn_handle BIGINT) -> ... VARCHAR Sets the SQL_ATTR_AUTOCOMMIT attribute to SQL_AUTOCOMMIT_OFF on the specified connection thus effectively starting an implicit transaction. odbc_commit or odbc_rollback must be called on such connection to co ... mplete the transaction. The completion starts another implicit transaction on this connection. See Transaction management for details. Parameters: conn_handle ( BIGINT ): ODBC connection handle created with odbc_c ... Only necessary with 2-step parameters binding, see Query parameters for details. Parameters: conn_handle ( BIGINT ): ODBC connection handle created with odbc_connect params_handle ( BIGINT ): parameters handle created with odbc_create_params params ( S ...
https://man.mtool.work/duckdb/2.0/core_extensions/odbc/functions.html
Quack Remote Protocol 8618
The Quack extension turns a DuckDB instance into a server that other DuckDB instances (clients) can connect to over HTTP. This page covers the protocol at a glance and walks through basic usage on both sides of the wire. For the full list o ... complex types (nested, decimals, intervals, ...) lossless across the wire. Single round-trip per query. After the initial connection handshake, a query needs only one request–response pair. Large results stream back in chunks via follow-up FETCH reques ... the listen URI, the HTTP URL, and, when the default authentication function is in use, the auth_token that clients need to connect. To choose the token yourself, pass the token parameter (see Security ): {:.codebox-server} CALL quack_serve('quack:localh ... ost', token = '⟨my_token⟩'); Tip The DuckDB CLI can start a server directly with the -serve argument and connect to one with -connect . See Command Line Arguments . By default the server refuses to bind anything other than a local host ...
https://man.mtool.work/duckdb/2.0/quack/overview.html
Python DB API 8500
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 ... represents a connection to a database. This is done through the duckdb.connect method, which takes three arguments: database , read_only and co ... argument can be used to provide a dict that contains key-value pairs referencing settings understood by DuckDB. In-Memory Connection The special value :memory: can be used to create an in-memory database . Note that for an in-memory database no data is ... persisted to disk (i.e., all data is lost when you exit the Python process). Named In-memory Connections The special value :memory: can also be postfixed with a name, for example: :memory:conn3 . When a name is provided, su ...
https://man.mtool.work/duckdb/2.0/clients/python/dbapi.html
ODBC 101: A Duck Themed Guide to ODBC 8328
What is ODBC? ODBC which stands for Open Database Connectivity, is a standard that allows different programs to talk to different databases including, of course, DuckDB. This makes it easier to build programs that work with many different d ... atabases, which saves time as developers don't have to write custom code to connect to each database. Instead, they can use the standardized ODBC interface, which reduces development time and costs, and pro ... grams are easier to maintain. However, ODBC can be slower than other methods of connecting to a database, such as using a native driver, as it adds an extra layer of abstraction between the application and the ... e official Microsoft ODBC documentation , which is a great resource for learning more about ODBC. General Concepts Handles Connecting Error Handling and Diagnostics Buffers and Binding Handles A handle is a pointer to a specific ODBC object which is use ...
https://man.mtool.work/duckdb/2.0/guides/odbc/general.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT
DuckDB 2.0 Documentation / man.mtool.work