extracts= should support multiple-column extracts
Open
Nobody has claimed this yet.
enhancement
wontfix
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 172
- Avg merge
- 9m
- Merged PRs (30d)
- 1
Description
Lookup tables can be constructed on compound columns, but the extracts= option doesn't currently support that.
Right now extracts can be defined in two ways:
# Extract these columns into tables with the same name:
dogs = db.table("dogs", extracts=["breed", "most_recent_trophy"])
# Same as above but with custom table names:
dogs = db.table("dogs", extracts={"breed": "Breeds", "most_recent_trophy": "Trophies"})
Need some kind of syntax for much more complicated extractions, like when two columns (say "source" and "source_version") are extracted into a single table.
Contributor 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.
Research direction
Start at the db.table() entry point and trace how the existing extracts= list and dictionary forms create lookup tables. Define and document a syntax for mapping multiple source columns to one extracted table, then add coverage for compound-column extraction alongside the existing examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlite
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100