Results of 1 - 3 of about 3 for hierarchy (0.001 sec.)
- Hive Partitioning 11235
- Examples Read data from a Hive partitioned dataset: SELECT * FROM read_parquet('orders/*/*/*.parquet', hive_partitioning = true); Write a table to a Hive partitioned dataset: COPY orders TO 'orders' (FORMAT parquet, PARTITION_BY (year, mont
...the partition key has a value that is determined by the name of the folder. Below is an example of a Hive partitioned file hierarchy. The files are partitioned on two keys ( year and month ). orders ├── year=2021 │ ├── month=1 │ │ ├── file1.parquet │ │ └─...uet └── year=2022 ├── month=11 │ ├── file4.parquet │ └── file5.parquet └── month=12 └── file6.parquet Files stored in this hierarchy can be read using the hive_partitioning flag. SELECT * FROM read_parquet('orders/*/*/*.parquet', hive_partitioning = true)...quet └── file5.parquet Auto-detection By default the system tries to infer if the provided files are in a hive partitioned hierarchy. And if so, the hive_partitioning flag is enabled automatically. The auto-detection will look at the names of the folders... - https://man.mtool.work/duckdb/2.0/data/partitioning/hive_partitioning.html
- WITH Clause 9859
- The WITH clause allows you to specify common table expressions (CTEs). Regular (non-recursive) common-table-expressions are essentially views that are limited in scope to a particular query. CTEs can reference each other and can be nested.
...1 3 2 4 3 5 5 6 8 7 13 8 21 9 34 Example: Tree Traversal WITH RECURSIVE can be used to traverse trees. For example, take a hierarchy of tags: CREATE TABLE tag (id INTEGER, name VARCHAR, subclassof INTEGER); INSERT INTO tag VALUES (1, 'U2', 5), (2, 'Blur',...'Art', NULL); The following query returns the path from the node Oasis to the root of the tree ( Art ). WITH RECURSIVE tag_hierarchy(id, source, path) AS ( SELECT id, name, [name] AS path FROM tag WHERE subclassof IS NULL UNION ALL SELECT tag.id, tag.name..., list_prepend(tag.name, tag_hierarchy.path) FROM tag, tag_hierarchy WHERE tag.subclassof = tag_hierarchy.id ) SELECT path FROM tag_hierarchy WHERE source = 'Oas... - https://man.mtool.work/duckdb/2.0/sql/query_syntax/with.html
- Partitioned Writes 6789
- Examples Write a table to a Hive partitioned dataset of Parquet files: COPY orders TO 'orders' (FORMAT parquet, PARTITION_BY (year, month)); Write a table to a Hive partitioned dataset of CSV files, allowing overwrites: COPY orders TO 'orde
...ites When the PARTITION_BY clause is specified for the COPY statement , the files are written in a Hive partitioned folder hierarchy. The target is the name of the root directory (in the example above: orders ). The files are written in-order in the file... - https://man.mtool.work/duckdb/2.0/data/partitioning/partitioned_writes.html
PREV
1
NEXT
DuckDB 2.0 Documentation / man.mtool.work