Results of 1 - 10 of about 54 for *│ (0.003 sec.)
- Relational API 10546
- 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
...1_000_000_000) t(id) SELECT id, id % 7 AS bucket") rel.filter("bucket = 3").order("id").limit(3).show() ┌───────┬────────┐ │ id │ bucket │ │ int64 │ int64 │ ├───────┼────────┤ │ 3 │ 3 │ │ 10 │ 3 │ │ 17 │ 3 │ └───────┴────────┘ Only a statement tha..., "text"]) duckdb_conn = duckdb.connect() rel = duckdb_conn.from_arrow(example_table) rel.show() Result ┌──────┬─────────┐ │ id │ text │ │ int8 │ varchar │ ├──────┼─────────┤ │ 1 │ a │ └──────┴─────────┘ from_csv_auto from_csv_auto(self: _duckdb.D...d': [1], "text":["a"]}) duckdb_conn = duckdb.connect() rel = duckdb_conn.from_df(df) rel.show() Result ┌───────┬─────────┐ │ id │ text │ │ int64 │ varchar │ ├───────┼─────────┤ │ 1 │ a │ └───────┴─────────┘ from_parquet from_parquet(self: _duckdb.... - https://man.mtool.work/duckdb/2.0/clients/python/relational_api.html
- Integration with Ibis 10546
- Ibis is a Python dataframe library that supports 20+ backends, with DuckDB as the default. Ibis with DuckDB provides a Pythonic interface for SQL with great performance. Warning Ibis 12.0.0 and earlier do not support DuckDB 2.0. The example
...┃ sex ┃ year ┃ ┡━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━┩ │ string │ string │ float64 │ float64 │ int64 │ int64 │ string │ int64 │ ├─────────┼───────────┼────────────────┼───────────...────┼───────────────────┼─────────────┼────────┼───────┤ │ Adelie │ Torgersen │ 39.1 │ 18.7 │ 181 │ 3750 │ male │ 2007 │ │ Adelie │ Torgersen │ 39.5 │ 17.4 │ 186 │ 3800 │ female │ 2...007 │ │ Adelie │ Torgersen │ 40.3 │ 18.0 │ 195 │ 3250 │ female │ 2007 │ │ Adelie │ Torgersen │ NULL │ NULL │ NULL │ NULL │ NULL... - https://man.mtool.work/duckdb/2.0/guides/python/ibis.html
- Analyzing a Git Repository 9834
- You can use DuckDB to analyze Git logs using the output of the git log command . Exporting the Git Log We start by picking a character that doesn't occur in any part of the commit log (author names, messages, etc). Since version v1.2.0, Duc
...─────────┬────────────┬──────────────────┬───────────────────────────────────────────────────────────────────────────────┐ │ timestamp │ hash │ author │ message │ │ timestamp with time zone │ varchar │ varchar │ varchar │ ├────────────────────────...──┼────────────┼──────────────────┼───────────────────────────────────────────────────────────────────────────────┤ │ 2025-02-25 18:12:54+01 │ d608a31e13 │ Mark │ MAIN_BRANCH_VERSIONING: Adopt also for Python build and amalgamation (#16400)...│ │ 2025-02-25 15:05:56+01 │ 920b39ad96 │ Mark │ Read support for Parquet Float16 (#16395) │ │ 2025-02-25 13:43:52+01 │ 61f5... - https://man.mtool.work/duckdb/2.0/guides/snippets/analyze_git_repository.html
- R-Tree Indexes 9775
- The spatial extension provides support for spatial indexing through the R-tree extension index type. Why Should I Use an R-Tree Index? When working with geospatial datasets, it is very common that you want to filter rows based on their spat
...ent: EXPLAIN SELECT count(*) FROM t1 WHERE ST_Within(geom, ST_MakeEnvelope(45, 45, 65, 65)); ┌───────────────────────────┐ │ UNGROUPED_AGGREGATE │ │ ──────────────────── │ │ Aggregates: │ │ count_star() │ └─────────────┬─────────────┘ ┌───────────...──┴─────────────┐ │ FILTER │ │ ──────────────────── │ │ ST_Within(geom, '...') │ │ │ │ ~2000 Rows │ └─────────────┬─────────────┘ ┌───────────...──┴─────────────┐ │ RTREE_INDEX_SCAN │ │ ──────────────────── │ │ t1 (RTREE INDEX SCAN : │ │ my_idx) │ │ │ │ Projections: geom │ │ │ │ ~10000... - https://man.mtool.work/duckdb/2.0/core_extensions/spatial/r-tree_indexes.html
- Writing Tests 9508
- Development and Testing It is crucial that any new features that get added have correct tests that not only test the “happy path”, but also test edge cases and incorrect usage of the feature. In this section, we describe how DuckDB tests ar
...──┬───┬──────────────────────┬──────────────────────┬──────────────────────┬──────────────────────┬──────────────────────┐ │ bool │ tinyint │ smallint │ int │ bigint │ hugeint │ … │ struct │ struct_of_arrays │ array_of_structs │ map │ union │ │ bo...olean │ int8 │ int16 │ int32 │ int64 │ int128 │ │ struct(a integer, … │ struct(a integer[]… │ struct(a integer, … │ map(varchar, v...arch… │ union("name" varch… │ ├─────────┼─────────┼──────────┼─────────────┼──────────────────────┼──────────────────────┼───┼────... - https://man.mtool.work/duckdb/2.0/dev/sqllogictest/writing_tests.html
- Create Synthetic Data 9404
- DuckDB lets you quickly generate synthetic datasets by combining a few building blocks: functions and clauses that generate rows , functions that generate values to fill those rows, and extensions that generate whole benchmark datasets. Thi
...into a table of rows, which is the usual starting point for a synthetic dataset: SELECT i FROM range(1, 4) t(i); ┌───────┐ │ i │ │ int64 │ ├───────┤ │ 1 │ │ 2 │ │ 3 │ └───────┘ range excludes the stop value, while generate_series includes it. VALU...raw from: SELECT * FROM (VALUES ('Alice', 'Engineering'), ('Bob', 'Sales')) t(name, department); ┌─────────┬─────────────┐ │ name │ department │ │ varchar │ varchar │ ├─────────┼─────────────┤ │ Alice │ Engineering │ │ Bob │ Sales │ └─────────┴───...ul as a scaffold to fill with generated values: FROM repeat_row('placeholder', 0, num_rows = 3); ┌─────────────┬─────────┐ │ column0 │ column1 │ │ varchar │ int32 │ ├─────────────┼─────────┤ │ placeholder │ 0 │ │ placeholder │ 0 │ │ placeholder │... - https://man.mtool.work/duckdb/2.0/guides/snippets/create_synthetic_data.html
- Geometry Data Type 9256
- Name Description GEOMETRY Geospatial entity The GEOMETRY data type is used to store and manipulate geometric objects, such as points, lines, and polygons. The GEOMETRY type was part of the spatial extension but became a built-in data type i
...- ┌───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ id │ geom │ │ int32 │ geometry │ ├───────┼────────────────────────────────────────────────────────────────────────────────...──────────────────────────────┤ │ 1 │ POINT (30 10) │ │ 2 │ LINESTRING (30 10, 10 30, 40 40) │ │ 3 │ POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) │ │ 4 │ M...ULTIPOINT (10 40, 40 30, 20 20, 30 10) │ │ 5 │ MULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30, 40 20)) │ │ 6 │ MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)),... - https://man.mtool.work/duckdb/2.0/sql/data_types/geometry.html
- UPDATE EXTENSIONS 8989
- The UPDATE EXTENSIONS statement allows synchronizing the locally installed extension state with the repository that published a given extension. This statement is the recommended way to keep up to date with new features or bug fixes being r
...tories and the update result: ┌────────────────┬──────────────┬─────────────────────┬──────────────────┬─────────────────┐ │ extension_name │ repository │ update_result │ previous_version │ current_version │ │ varchar │ varchar │ varchar │ varchar...│ varchar │ ├────────────────┼──────────────┼─────────────────────┼──────────────────┼─────────────────┤ │ iceberg │ core_ni...ghtly │ UPDATED │ 6386ab5 │ b3ec51a │ │ tpch │ core │ NO_UPDATE_AVAILABLE │ v2.0.0 │ v2.0.0 │ │ httpfs │ core │ NO_UPDATE_AVAILABL... - https://man.mtool.work/duckdb/2.0/sql/statements/update_extensions.html
- Expression API 8929
- The Expression class represents an instance of an expression . Why Would I Use the Expression API? Use expressions to build filters and computed columns in Python. They are useful when column names or conditions depend on your code. import
...21, 13, 14] }) Selecting a single column: a_column = duckdb.col('a') duckdb.from_df(df).select(a_column).show() ┌───────┐ │ a │ │ int64 │ ├───────┤ │ 1 │ │ 2 │ │ 3 │ │ 4 │ └───────┘ Selecting multiple columns: col_list = [ duckdb.col('a') * 10, d...col('b').is_null(), duckdb.col('c') + 5 ] duckdb.from_df(df).select(*col_list).show() ┌──────────┬─────────────┬─────────┐ │ (a * 10) │ (b IS NULL) │ (c + 5) │ │ int64 │ boolean │ int64 │ ├──────────┼─────────────┼─────────┤ │ 10 │ false │ 47 │ │...20 │ true │ 26 │ │ 30 │ false │ 18 │ │ 40 │ false │ 19 │ └──────────┴─────────────┴─────────┘ A name is never split at a dot: c... - https://man.mtool.work/duckdb/2.0/clients/python/expression.html
- Variant Type 8929
- The VARIANT type stores typed, binary data where each row is self-contained with its own type information. This differs from the JSON type , which is physically stored as text. Because type metadata is embedded per-value, VARIANT provides b
...2, 3]::VARIANT), (4, {'name': 'Alice', 'age': 30}::VARIANT); SELECT * FROM events; ┌───────┬────────────────────────────┐ │ id │ data │ │ int32 │ variant │ ├───────┼────────────────────────────┤ │ 1 │ 42 │ │ 2 │ hello world │ │ 3 │ [1, 2, 3] │ │...4 │ {'age': 30, 'name': Alice} │ └───────┴────────────────────────────┘ Note that the keys of VARIANT objects are sorted: {'na...ow: SELECT id, data, variant_typeof(data) AS vtype FROM events; ┌───────┬────────────────────────────┬───────────────────┐ │ id │ data │ vtype │ │ int32 │ variant │ varchar │ ├───────┼────────────────────────────┼───────────────────┤ │ 1 │ 42 │ IN... - https://man.mtool.work/duckdb/2.0/sql/data_types/variant.html
DuckDB 2.0 Documentation / man.mtool.work