collections: allow a collection to be set/mapped from a spreadsheet
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 23
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 17
Description
I want to:
- define a bunch of mappings in a spreadsheet (XLS or gsheets)
- Pull those mappings into the CLI
- Upload them into a collection
This feels like it's something the CLI is very capable of doing.
If the sheet just has two columns, we can just pull them as key/value pairs. Otherwise we need to take a range (or I suppose two columns). We may need to know whether the first two rows are a header and can be ignored (although it's probably harmless to include a header in the map - it's just one redundant key)
The mapping should be a single JSON object uploaded as a key to a single value
So the CLI command is like:
openfn collections set my-collection my-key --items pathOrUrlToSheet
Maybe we need extra CLI args for "parse items as spreadsheet" or "choose this range" or "ignore headers".
Contributor guide
No contributing guide indexed for this repository
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 by reviewing the CLI's existing collection commands and the proposed collections set my-collection my-key --items pathOrUrlToSheet entry point. Clarify how XLS or Google Sheets input, ranges, and headers should be handled. Done means spreadsheet mappings are converted to one JSON object and uploaded as one collection value, with the command behavior defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100