[DCP Ingestion] Namespace support in preprocessor - #686
Conversation
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| UnusedCode | 2 minor |
| Security | 1 medium |
| CodeStyle | 2 minor |
| Complexity | 2 medium |
🟢 Metrics 54 complexity
Metric Results Complexity 54
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Code Review
This pull request introduces parallel processing for CSV imports using a ProcessPoolExecutor in the Runner, along with changes to prevent file collisions by incorporating the file name into observation shard names. It also adds GCS upload retry logic, improves custom namespace handling across importers and validators, and optimizes custom dimension serialization. Feedback on these changes highlights a fragile design pattern in _write_observation_shard where the first parameter is overloaded to accept either a list or a tuple, and warns of a potential collision risk for node shards similar to the one resolved for observation shards.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces changes to support grouping and exporting triples by their provenance directories, handling custom namespace prefixes during entity resolution, and preventing the duplication of global triples across multiple imports. It updates several importers, the node registry, and database interfaces to track and propagate provenance directories. A correctness bug was identified in events_importer.py where unresolved entity names are registered before they are resolved, which can lead to invalid registrations and missing triples.
clincoln8
left a comment
There was a problem hiding this comment.
Thank you!!!!!!
Nonblocking questions / comments. Can likely be addressed in followups if needed.
|
Thanks Christie! Fixed like half the comments, the half regarding namespaces i think will need to be hanlded in the namespace work coming up, but agree fully on the cleanup needed :) |
Standardize on
provenance_idacross graph nodes and enable per-provenance GCS handshakesdcpbridgemode to generate a per-provenance{workflow_id}.jsonhandshake manifest whereimportListspecifies each individual provenance folder (provenance/<name>) and its shard glob (**/*.jsonld).provenance_dir(s)withprovenance_id(s)acrossEntity,Property,Provenance, andSourceto matchStatVar,EventType, andEntityType.config.import_name()andprovenance_dirpiping in importers (Observations,VariablePerRow,Events,Mcf) and runner IPC serialization.strip_namespace(prov_id)) to a single location at the JSON-LD export boundary inNodes.triples_by_provenance_dir().