Exploration proposes an alignment per table
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Read decision 0036 to understand the alignment proposal concept, then examine the current exploration code and ontology_proposals structure. Trace decide_proposal and the adopt endpoints to add the grouping and transactional adopt path. Finally, update scripts/bench/mappings.mjs to score alignments using the truth file's new alignment section.
Written by the indexing model from the issue text.
Description
Exploration today reads a schema and produces entities of two classes it inserted itself. 0036 decisions 1, 2 and 6: it produces instead an alignment proposal per table — the class the table is a table of, the attributes its columns carry, the relations its foreign keys are, and for each aligned column an expression that turns the column into the attribute's value — and a person adopts it.
What a proposal holds
For dw.dwd_ord_dtl on the wide corpus:
| column | is |
|---|---|
amt_pay, qty, ord_st, dt_crt |
attributes of Order |
buyer_id, shop_id |
relations Order → Customer, Order → Shop |
shop_nm, prov, buyer_lvl |
attributes of Shop, Address, Customer, flattened in |
ver, etl_dt, rmk, price_old |
nothing |
Exploration finds existing classes and attributes first (the ontology, with a pack from 0008, usually has Order) and proposes new ones only where none fits — 0003's loop with a schema in place of a corpus. On a base with no ontology it proposes the class (decision 6); the difference from today is that a proposal waits and ensure_concept_types did not.
Where it goes
ontology_proposals already has the four sections this needs — entity_types, attribute_types, relation_types, map_to — and the attribute payload already carries datatype and unit. What it does not have is a way to say "these forty rows are one table's alignment, adopt or reject them together", and decide_proposal today only marks a row; creating the ontology rows is the separate adopt endpoints' job. So this needs:
- an alignment table: table → class, column → attribute (or relation) with the conversion tree from #555;
- a proposal that groups a table's rows, adopted as one thing — adopting
Orderwhile rejecting every attribute of it is not a decision anyone means to make; - an adopt path that writes the ontology rows and the alignment rows in one transaction.
What exploration does not propose
Definitions. GMV, refund rate, valid orders — 0 of 18 on the wide corpus, and what it would propose is sum(amt_pay): runs, looks right, off by a hundred and includes the test orders. A definition is a rule a person writes over aligned attributes (decision 4, #556). #507 is the other way a rule can arrive — stated in a document, with provenance — and is complementary, not this.
Measured by
scripts/bench/mappings.mjs scores today's proposals by number. An alignment is scored differently: did amt_pay land on Order.paid_amount, did buyer_id become a relation, did ver stay out. The truth file for wide has keys, traps and dimensions already; it gains an alignment section.
Depends on #553 having landed, or every exploration on a fresh base re-creates the column-name entities it is trying to replace.
- Dominant language
- Rust
- Stars
- 8.1k
- Forks
- 1.1k
- Avg merge
- 21h 2m
- Merged PRs (30d)
- 263
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from deeplethe/utopia
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 56/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
deeplethe/utopia#1341 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 5/5 Over a week Newbie friendliness 48/100
deeplethe/utopia#1338 · 2 comments ·
Maintainers usually reply within 1 day
All issues in deeplethe/utopia
Similar issues
-
memory_patch_page drops the `#` of headings like `## Notes on C#`Possibly taken @viniciusdsandrade claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
akitaonrails/ai-memory#1859 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
wealthfolio/wealthfolio#2376 ·
Maintainers usually reply within 1 day
-
kind/bug kind/security
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
spiceai/spiceai#15826 · 1 comment ·
Maintainers usually reply within 1 day
-
area:cli bug dotnet good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
cargo-bins/cargo-binstall#2725 ·
Maintainers usually reply within 1 day