A bug in flatten_id function
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- data-engineering
Research direction
Locate the flatten_id function in the repository and inspect how it handles keys whose values are null. Reproduce the case described in the issue, then verify that an existing null value does not create a new item and that the resulting *_id value matches the requested behavior.
Written by the indexing model from the issue text.
Description
The judgement is not correct, sometime if the key is exist but value is null, a new item will be created. I suggest the next codes:
def flatten_id(item, target):
if target in item:
if item[target] is not None:
item[target + '_id'] = item.pop(target, {}).pop('id', None)
return
else:
item.pop(target, {})
item[target + '_id'] = None
- Dominant language
- Python
- Stars
- 16
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No 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 singer-io/tap-gitlab
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
singer-io/tap-gitlab#29 ·
-
Only one page of the API integration is integrated, processing only 20 lines per project in GitLab.Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
singer-io/tap-gitlab#47 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
singer-io/tap-gitlab#26 · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
singer-io/tap-gitlab#24 ·
-
Suggestion PipelinesOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
singer-io/tap-gitlab#23 ·
All issues in singer-io/tap-gitlab
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
RunestoneInteractive/rs#1661 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
streamlink/streamlink#7192 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
aws-samples/sample-per-model-bedrock#795 ·
Maintainers usually reply within 1 day