⌘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 184 for Column (0.005 sec.)
ALTER TABLE Statement 10084
The ALTER TABLE statement changes the schema of an existing table in the catalog. Examples CREATE TABLE integers (i INTEGER, j INTEGER); Add a new column with name k to the table integers , it will be filled with the default value NULL : AL ... TER TABLE integers ADD COLUMN k INTEGER; Add a new column with name l to the table integers, it will be filled with the default value 10: ALTER TABLE in ... tegers ADD COLUMN l INTEGER DEFAULT 10; Drop the column k from the table integers: ALTER TABLE integers DROP k; Change the type of the colum ... n i to the type VARCHAR using a standard cast: ALTER TABLE integers ALTER i TYPE VARCHAR; Change the type of the column i to the type VARCHAR , using the specified expression to convert the data for each row: ALTER TABLE integers ALTER i SET ...
https://man.mtool.work/duckdb/2.0/sql/statements/alter_table.html
Query 9257
The duckdb_query method allows SQL queries to be run in DuckDB from C. This method takes two parameters, a (null-terminated) SQL query string and a duckdb_result result pointer. The result pointer may be NULL if the application is not inter ... sed to clean up the result. Elements can be extracted from the duckdb_result object using a variety of methods. The duckdb_column_count can be used to extract the number of columns. duckdb_column_name and duckdb_column_type can be used to extract the n ... ames and types of individual columns. Example duckdb_state state; duckdb_result result; // create a table state = duckdb_query(con, "CREATE TABLE integers (i ... uckdb_fetch_chunk function. Note that the function is NOT generic: we do need to know exactly what the types of the result columns are. duckdb_database db; duckdb_connection con; duckdb_open(nullptr, &db); duckdb_connect(db, &con); duckdb_result res; d ...
https://man.mtool.work/duckdb/2.0/clients/c/query.html
Information Schema 9015
The views in the information_schema are SQL-standard views that describe the catalog entries of the database. These views can be filtered to obtain information about a specific column or table. DuckDB's implementation is based on PostgreSQL ... 's information schema . Tables character_sets : Character Sets Column Description Type Example character_set_catalog Currently not implemented – always NULL . VARCHAR NULL character_set_schema ... aining the default collation. VARCHAR 'pg_catalog' default_collate_name Name of the default collation. VARCHAR 'ucs_basic' columns : Columns The view that describes the catalog information for columns is information_schema.columns . It lists the column ... s present in the database and has the following layout: Column Description Type Example table_catalog Name of the database containing the table (always the current database). VARCHAR 'm ...
https://man.mtool.work/duckdb/2.0/sql/meta/information_schema.html
DuckDB_% Metadata Functions 8960
DuckDB offers a collection of table functions that provide metadata about the current database. These functions reside in the main schema and their names are prefixed with duckdb_ . The resultset returned by a duckdb_ table function may be ... view. For example, you can use a duckdb_ function call in the FROM clause of a SELECT statement, and you may refer to the columns of its returned resultset elsewhere in the statement, for example in the WHERE clause. Table functions are still function ... able_metrics() function lists the metrics that can be collected by the profiler , e.g., using the tracked_metrics setting. Column Description Type metric_name The name of the metric, e.g., query.cpu_time . VARCHAR metric_type The type of the metric's v ... cribes the metric. VARCHAR unit The unit of the metric, e.g., seconds or rows . Empty for unitless metrics. VARCHAR duckdb_columns The duckdb_columns() function provides metadata about the columns available in the DuckDB instance. Column Description Ty ...
https://man.mtool.work/duckdb/2.0/sql/meta/duckdb_table_functions.html
Complete API 8486
This page contains the reference for DuckDB's C API. The reference contains several deprecation notices. These concern methods whose long-term availability is not guaranteed as they may be removed in the future. That said, DuckDB's develope ... st char * query , duckdb_result * out_result ); void duckdb_destroy_result ( duckdb_result * result ); const char * duckdb_column_name ( duckdb_result * result , idx_t col ); duckdb_type duckdb_column_type ( duckdb_result * result , idx_t col ); duckdb ... _statement_type duckdb_result_statement_type ( duckdb_result result ); duckdb_logical_type duckdb_column_logical_type ( duckdb_result * result , idx_t col ); duckdb_arrow_options duckdb_result_get_arrow_options ( duckdb_result ... * result ); idx_t duckdb_column_count ( duckdb_result * result ); idx_t duckdb_row_count ( duckdb_result * result ); idx_t duckdb_rows_changed ( duckdb_re ...
https://man.mtool.work/duckdb/2.0/clients/c/api.html
Prepared Statements 8453
A prepared statement is a parameterized query. The query is prepared with question marks ( ? ) or dollar symbols ( $1 ) indicating the parameters of the query. Values can then be bound to these parameters, after which the prepared statement ... kdb_statement_type duckdb_prepared_statement_type ( duckdb_prepared_statement statement ); idx_t duckdb_prepared_statement_column_count ( duckdb_prepared_statement prepared_statement ); const char * duckdb_prepared_statement_column_name ( duckdb_prepar ... ed_statement prepared_statement , idx_t col_idx ); duckdb_logical_type duckdb_prepared_statement_column_logical_type ( duckdb_prepared_statement prepared_statement , idx_t col_idx ); duckdb_type duckdb_prepared_statement_colum ... he prepared statement. Return Value duckdb_statement_type value or DUCKDB_STATEMENT_TYPE_INVALID duckdb_prepared_statement_column_count Returns the number of columns present in the result of the prepared statement. If any of the column types are invali ...
https://man.mtool.work/duckdb/2.0/clients/c/prepared.html
Relational API 8331
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 ... alled on. Lazy Evaluation Building a relation runs nothing: DuckDB binds the text once to learn the columns and their types, and holds no data. For example, a relation over a billion rows is built at once: import duckdb duckdb_co ... he params list or dict is copied when the relation is created, and its values are converted each time the relation runs. A column is also an attribute of the relation, as in rel.price , unless a method has its name: a column called offset is reached as ... ect such as io.StringIO or io.BytesIO . * header : bool, int, keyword-only, default: None Whether the first line holds the column names; 0 means True . Detected when omitted. * compression : str, keyword-only, default: None Compression of the files: 'n ...
https://man.mtool.work/duckdb/2.0/clients/python/relational_api.html
Appender 8276
Appenders are the most efficient way of loading data into DuckDB from within the C interface, and are recommended for fast data loading. The appender is much faster than using prepared statements or individual INSERT INTO statements. Append ... s are made in row-wise format. For every column, a duckdb_append_[type] call should be made, after which the row should be finished by calling duckdb_appender_end_row . A ... er * out_appender ); duckdb_state duckdb_appender_create_query ( duckdb_connection connection , const char * query , idx_t column_count , duckdb_logical_type * types , const char * table_name , const char ** column_names , duckdb_appender * out_appende ... r ); idx_t duckdb_appender_column_count ( duckdb_appender appender ); duckdb_logical_type duckdb_appender_column_type ( duckdb_appender appender , idx_t col ...
https://man.mtool.work/duckdb/2.0/clients/c/appender.html
Writing to Iceberg 8243
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. ... olution operations: -- Rename the table ALTER TABLE iceberg_catalog.default.simple_table RENAME TO renamed_table; -- Add a column ALTER TABLE iceberg_catalog.default.renamed_table ADD COLUMN col3 DOUBLE; -- Rename a column ALTER TABLE iceberg_catalog.d ... efault.renamed_table RENAME COLUMN col2 TO name; -- Drop a column ALTER TABLE iceberg_catalog.default.renamed_table DROP COLUMN col3; -- Change the type of a ... column ALTER TABLE iceberg_catalog.default.renamed_table ALTER COLUMN col1 TYPE BIGINT; -- Set and drop the default value of a co ...
https://man.mtool.work/duckdb/2.0/core_extensions/iceberg/writing_to_iceberg.htm...
Reading Faulty CSV Files 8067
CSV files can come in all shapes and forms, with some presenting many errors that make the process of cleanly reading them inherently difficult. To help users read these files, DuckDB supports detailed error messages, the ability to skip fa ... TABLE people (name VARCHAR, birth_date DATE); DuckDB detects the following error types: CAST : Casting errors occur when a column in the CSV file cannot be cast to the expected schema value. For example, the line Pedro,The 90s would cause an error sinc ... e the string The 90s cannot be cast to a date. MISSING COLUMNS : This error occurs if a line in the CSV file has fewer columns than expected. In our example, we expect two columns; the ... refore, a row with just one value, e.g., Pedro , would cause this error. TOO MANY COLUMNS : This error occurs if a line in the CSV has more columns than expected. In our example, any line with more than two colu ...
https://man.mtool.work/duckdb/2.0/data/csv/reading_faulty_csv_files.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT
DuckDB 2.0 Documentation / man.mtool.work