⌘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 26 for dictionary (0.004 sec.)
Execution Format 13985
Vector is the container format used to store in-memory data during execution. DataChunk is a collection of Vectors, used for instance to represent a column list in a PhysicalProjection operator. Data Flow DuckDB uses a vectorized query exec ... nly store the literal once. Constant vectors are also emitted by the storage when decompressing from constant compression. Dictionary Vectors Dictionary vectors are physically stored as a child vector, and a selection vector that contains indexes into the ... child vector. Dictionary vectors are emitted by the storage when decompressing from dictionary compression. Just like constant vectors, dictionary ... vectors are also emitted by the storage. When deserializing a dictionary compressed column segment, we store this in a dictionary vector so we can keep the data compressed during query execution. ...
https://man.mtool.work/duckdb/2.0/internals/vector.html
Types 11141
DuckDB is a strongly typed database system. As such, every column has a single type specified. This type is constant over the entire column. That is to say, a column that is labeled as an INTEGER column will only contain INTEGER values. Duc ... ype ( duckdb_logical_type type ); duckdb_type duckdb_enum_internal_type ( duckdb_logical_type type ); uint32_t duckdb_enum_dictionary_size ( duckdb_logical_type type ); char * duckdb_enum_dictionary_value ( duckdb_logical_type type , idx_t index ); duckdb_ ... logical_type type ); Parameters type : The logical type object Return Value The internal type of the enum type duckdb_enum_dictionary_size Retrieves the dictionary size of the enum type. Syntax uint32_t duckdb_enum_dictionary_size ( duckdb_logical_type typ ... e ); Parameters type : The logical type object Return Value The dictionary size of the enum type duckdb_enum_dictionary_value Retrieves the dictionary value at the specified position from the enum. ...
https://man.mtool.work/duckdb/2.0/clients/c/types.html
Executing SQL in Python 10827
SQL queries can be executed using the duckdb.sql function. import duckdb duckdb.sql("SELECT 42").show() By default this will create a relation object. The result can be converted to various formats using the result conversion functions. For ... SELECT * FROM integers WHERE i = ?", [42]).fetchall() Named parameters use the $name syntax, with the values supplied as a dictionary: con.execute("SELECT * FROM integers WHERE i = $value", {"value": 42}).fetchall() con.sql and duckdb.sql take the values t ... eyword argument: con.sql( "SELECT * FROM integers WHERE i = $value", params={"value": 42}, ).fetchall() The params list or dictionary is copied when sql is called, together with any list, tuple or dictionary inside it. Other values are converted each time ...
https://man.mtool.work/duckdb/2.0/guides/python/execute_sql.html
Data Ingestion 9720
This page contains examples for data ingestion to Python using DuckDB. First, import the DuckDB package: import duckdb Then, proceed with any of the following sections. CSV Files CSV files can be read using the read_csv function, called eit ... columns a and A_1 . Use register() to give a DataFrame or Arrow object a SQL name. This also works for objects stored in a dictionary or class attribute. import duckdb import pandas as pd my_dictionary = {} my_dictionary["test_df"] = pd.DataFrame.from_dict ... ({"i": [1, 2, 3, 4], "j": ["one", "two", "three", "four"]}) duckdb.register("test_df_view", my_dictionary["test_df"]) print(duckdb.sql("SELECT * FROM test_df_view").fetchall()) [(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four')] ...
https://man.mtool.work/duckdb/2.0/clients/python/data_ingestion.html
Vectors 9240
Vectors represent a horizontal slice of a column. They hold a number of values of a specific type, similar to an array. Vectors are the core data representation used in DuckDB. Vectors are typically stored within data chunks . The vector an ... f-ten. Enums Enums are stored as unsigned integer values internally. The exact native type depends on the size of the enum dictionary, as shown in the following table: Dictionary size NativeType <= 255 uint8_t <= 65535 uint16_t <= 4294967295 uint32_t The d ... n be used to obtain the internal type of the enum. In order to obtain the actual string value of the enum, the duckdb_enum_dictionary_value function must be used to obtain the enum value that corresponds to the given dictionary entry. Note that the enum di ... vector. The length of the selection vector must be less than or equal to the length of the vector. Turns the vector into a dictionary vector. Syntax void duckdb_slice_vector ( duckdb_vector vector , duckdb_selection_vector sel , idx_t len ); Parameters vec ...
https://man.mtool.work/duckdb/2.0/clients/c/vector.html
Enum Data Type 9240
Name Description ENUM Dictionary representing all possible string values of a column The enum type represents a dictionary data structure with all possible unique values of a column. For example, a column storing the days of the week can be ... lity (i.e., fewer distinct values). This is because the column only stores a numerical reference to the string in the enum dictionary, resulting in immense savings in disk storage and faster query performance. Creating Enums You can create an enum using ha ...
https://man.mtool.work/duckdb/2.0/sql/data_types/enum.html
Reading and Writing Parquet Files 8926
Examples Read a single Parquet file: SELECT * FROM 'test.parquet'; Figure out which columns/types are in a Parquet file: DESCRIBE SELECT * FROM 'test.parquet'; Create a table from a Parquet file: CREATE TABLE test AS SELECT * FROM 'test.par ... es(100_000)) TO 'result-brotli.parquet' (FORMAT parquet, COMPRESSION brotli); To configure the page size of Parquet file's dictionary pages, use the STRING_DICTIONARY_PAGE_SIZE_LIMIT option (default: 1 GiB): COPY lineitem TO 'lineitem-with-custom-dictionar ... y-size.parquet' (FORMAT parquet, STRING_DICTIONARY_PAGE_SIZE_LIMIT 100_000); New The following feature was introduced in DuckDB 2.0. To split data pages below the default 10 ...
https://man.mtool.work/duckdb/2.0/data/parquet/overview.html
Complete API 8447
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 ... ype ( duckdb_logical_type type ); duckdb_type duckdb_enum_internal_type ( duckdb_logical_type type ); uint32_t duckdb_enum_dictionary_size ( duckdb_logical_type type ); char * duckdb_enum_dictionary_value ( duckdb_logical_type type , idx_t index ); duckdb_ ... logical_type type ); Parameters type : The logical type object Return Value The internal type of the enum type duckdb_enum_dictionary_size Retrieves the dictionary size of the enum type. Syntax uint32_t duckdb_enum_dictionary_size ( duckdb_logical_type typ ... e ); Parameters type : The logical type object Return Value The dictionary size of the enum type duckdb_enum_dictionary_value Retrieves the dictionary value at the specified position from the enum. ...
https://man.mtool.work/duckdb/2.0/clients/c/api.html
Export to Numpy 8447
The result of a query can be converted to Numpy arrays using the fetchnumpy() function, which returns a dictionary that maps each column name to a Numpy array. For example: import duckdb import numpy as np my_arr = duckdb.sql("SELECT unnest ...
https://man.mtool.work/duckdb/2.0/guides/python/export_numpy.html
Data Types 8447
General-Purpose Data Types The table below shows all the built-in general-purpose data types. The alternatives listed in the aliases column can be used to refer to these types as well, however, note that the aliases are not part of the SQL ... have the same data type within each instance of the LIST , but can have any number of elements. [1, 2, 3] INTEGER[] MAP A dictionary of multiple named values, each key having the same type and each value having the same type. Keys and values can be any ty ... be different types from one another. Rows may have different keys. map([1, 2], ['a', 'b']) MAP(INTEGER, VARCHAR) STRUCT A dictionary of multiple named values, where each key is a string, but the value can be a different type for each key. Each row must ha ...
https://man.mtool.work/duckdb/2.0/sql/data_types/overview.html
PREV 1 2 3 NEXT
DuckDB 2.0 Documentation / man.mtool.work