[design] Distinguish source data and output data changes

Open
#3,400 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

No files, tests, or entry points are named. Start by locating the entity data model and the processing path that sets last_change, then compare source-update tracking, last_alert or modifiedAt, and listingDate as possible requirements. Done means an agreed design that clearly distinguishes source changes from processing-output changes.

Written by the indexing model from the issue text.

Description

question research zavod

We have a recurring customer concern around timestamps, especially in scenarios where the customer uses the last_change entity field to re-screen their counterparty database against one or many watchlist entities. Right now, last_change is reflective of changes in the outcome of processing in OS, not the last change at source. I think we need to propose one or more additional fields to provide at-source update timestamps separately. Here's some ideas:

  • We could make a table in the database which keeps track of at-source first discovery and most recent change.
  • We could add a field to entities to include last_alert. We could also - alternatively - populate the modifiedAt property in the data itself.
  • We may also want to start computing listingDate for source lists where this is not explicitly provided.
Dominant language
Python
Stars
810
Forks
187
Avg merge
1d 7h
Merged PRs (30d)
133

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.

More from opensanctions/opensanctions

All issues in opensanctions/opensanctions

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.