cognitedata / cognitedata/python-extractor-utils

Events does not handle duplicate or already existing IDs

Open
#213 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13
Forks
6
Avg merge
2d 6h
Merged PRs (30d)
11

Description

https://github.com/cognitedata/python-extractor-utils/blob/3e99e07943a7bd0c16ca3f4bd224a81c2052480f/cognite/extractorutils/uploader/events.py#L135

Using EventUploadQueue feels different from TimeSeriesUploadQueue, RawUploadQueue, FileUploadQueue, and SequenceUploadQueue.

For each, there's some way to create_missing, ensure_parent, or overwrite except for EventUploadQueue. Unfortunately, when you EventUploadQueue, you must pre-process the Events that you are adding and ensure that it does not already exist.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at cognite/extractorutils/uploader/events.py around line 135 and compare EventUploadQueue with TimeSeriesUploadQueue, RawUploadQueue, FileUploadQueue, and SequenceUploadQueue. Determine how those queues handle missing or existing resources, then verify that EventUploadQueue can handle duplicate or already-existing Events without requiring caller-side preprocessing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.