awslabs / awslabs/amazon-dynamodb-tools

[verb] `run` - execute a python function against every item in a table

Open
#97 0 comments 0 reactions 0 assignees View on GitHub
bulk_executor bulk-verb enhancement help wanted
Dominant language
Python
Stars
181
Forks
50
Avg merge
4h 11m
Merged PRs (30d)
36

Description

A "run" verb might be popular and generically useful. It which would execute a user-provided (during the bootstrap) python function against every item in the table. Really, it should run only against every item matching a "where" clause.

Basically it gets handed an item and has the chance to do whatever it wants.

This does sound a lot like `update`. Unclear if there's enough distinction here.

Possibly there could be a parameter to give it a whole item collection at a time for processing. Or maybe that's a separate verb. But some people want to do things like keep only the last 10 orders and delete everything before that. You'd need a full IC view to accomplish this.

```
./bulk run --table t --where 'a=b' --executor foo.py
```

Contributor guide

Open the contributing guide

Research direction

Start from the `bulk run` command shown in the issue and inspect how the existing `update` verb handles `--table` and `--where`. Clarify whether the executor receives individual items or a collection, and define how this differs from `update`; the issue currently does not specify an acceptance test or a settled meaning of done.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.