Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
de08575
feature: add entity hierarchy handling (#143)
stevenhsd Aug 25, 2026
42fb3e4
build: upgrade duckdb to v1.4
georgeRobertson Aug 27, 2026
a9c0872
docs: add dev classifier
georgeRobertson Aug 27, 2026
5c1e11b
build: upgrade duckdb to v1.4 (#147)
georgeRobertson Aug 27, 2026
a3cafe7
feat: add orphan record identification and removal (#150)
georgeRobertson Sep 11, 2026
de4e44d
refactor: unify HierarchyNode and ChildHierarchyNode also tweaked ba…
stevenhsd Sep 15, 2026
516e5e4
fix: add user feedback message for unsupported file type (#142)
georgeRobertson Sep 15, 2026
c2b8cf5
fix: change record rej ct to be eq to records processed when file rej…
georgeRobertson Sep 16, 2026
a6b6154
refactor: tweak hierarchy node design to allow iteration both directi…
stevenhsd Sep 17, 2026
7792d41
feat: group rejections for mandatory primary keys (#152)
georgeRobertson Sep 18, 2026
b63c2ac
fix: revert change to SubStats population in error reports (#156)
georgeRobertson Sep 18, 2026
a817759
build: upgrade java runtime for dev (#158)
georgeRobertson Sep 22, 2026
49290bb
fix: ensure missing parent and group rejection records are being remo…
stevenhsd Sep 23, 2026
41b9020
fix: add message templating to error messages on orph+group rej (#161)
georgeRobertson Sep 23, 2026
51a9c07
fix: add entity into data contract details to deal with duplicate co…
georgeRobertson Sep 23, 2026
3eca2f1
docs: add entity relationships detail to docs (#157)
stevenhsd Sep 23, 2026
43c428f
fix: raise processing error where filter is materialising null values…
stevenhsd Sep 29, 2026
21043db
feat: add empty_entity check post filters for mandatory entities (#163)
georgeRobertson Sep 29, 2026
1a0beb6
refactor: remove original entities (#164)
georgeRobertson Sep 29, 2026
a51254d
perf: only check for orphaned records on entities with at least one r…
georgeRobertson Sep 29, 2026
b3e03b4
fix: ensure network and load_dtd are disabled in xml reading (#167)
georgeRobertson Sep 29, 2026
8f5e1ae
fix: ensure that original entity detials persisted in feedback messag…
stevenhsd Sep 29, 2026
e2a9c16
docs: update docs around entity relationships for root entities (#169)
georgeRobertson Sep 30, 2026
2092879
feat: add facility to add additional checks at end of file transforma…
stevenhsd Sep 30, 2026
e4dab57
perf: remove orphan tracker as it's causing significant performance d…
georgeRobertson Sep 30, 2026
9415d2a
fix: exit processing for files that fail file transformation (#171)
georgeRobertson Oct 5, 2026
acaf522
perf: cache entities during orphan and group rejections to avoid reco…
stevenhsd Oct 7, 2026
df8bbe4
feat: add orphan and group rejections to spark backend (#174)
georgeRobertson Oct 8, 2026
a342af7
fix: group rejection not filtering out invalid records correctly (#175)
georgeRobertson Oct 8, 2026
ddfdf64
build: upgrade urllib3 from 2.7 to 2.8 (#178)
georgeRobertson Oct 9, 2026
a32a01b
fix: refactor the join_header method in duckdb to deal with out of bo…
georgeRobertson Oct 9, 2026
06eaee6
build: bump virtualenv version to 21.7.13 to resolve vulns (#179)
georgeRobertson Oct 9, 2026
5bc3eda
docs: add udfs to docs
georgeRobertson Oct 12, 2026
72d15be
* fix: ensure that null records are not included in record counts whe…
stevenhsd Oct 12, 2026
562ca2b
docs: fix incorrect text in some of the indexes
georgeRobertson Oct 12, 2026
3c71d18
refactor: removed ods udfs as they were functionally useless
georgeRobertson Oct 12, 2026
986a03b
Merge pull request #183 from NHSDigital/docs/gr-ndsp-683-add_udfs_to_…
georgeRobertson Oct 12, 2026
54f704b
fix: adjust regex check for timezone offsets, allowing : to be includ…
stevenhsd Oct 12, 2026
665e1fa
refactor: rename of error code and messages related to empty entities…
stevenhsd Oct 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[tools]
python="3.12"
poetry="2.4.1"
java="liberica-1.8.0"
java="zulu-17.60.17"
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
python 3.12.12
poetry 2.4.1
java liberica-1.8.0
java zulu-17.60.17
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ __The DVE offers__:
- Format normalization to Parquet for a unified data representation
- Data modelling and typecasting
- Business-rule validations executed on supported backends such as Spark and DuckDB, with the option to add custom backends
- Validate and enforce referential integrity checks with minimal configuration
- Deriving new fields and entities
- Clear validation reporting, including summary insights and record-level error messages

Expand All @@ -41,7 +42,8 @@ Below is a list of features that we would like to implement or have been request
| Uplift to Python 3.11 | 0.2.0 | Yes |
| Uplift Pyspark to 3.5 | 0.8.0 | Yes |
| Allow DVE to run on Python 3.12+ | 0.8.0 | Yes |
| Upgrade to Pydantic 2.0 | 0.9.0 | Yes |
| Upgrade to Pydantic 2.0 | 0.9.0 | Yes |
| Upgrade DuckDB to v1.4 | 0.10.0 | Yes |
| Uplift Pyspark to 4.0+ | TBA | No |
| Polars upgrade to v1+ | TBA | No |
| DuckDB upgrade to v1.5+ | TBA | No |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@
"items": {
"type": "string"
}
},
"reader_additional_checks": {
"description": "A mapping of additional checks to perform on entities after initial read",
"type": "object",
"additionalProperties": {
"$ref": "reader_additional_checks.json"
}
},
}
},

"required": ["fields"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "data-ingest:contract/components/reader_additional_checks.schema.json",
"title": "reader_additional_checks",
"description": "Additional checks to perform on initially read entities",
"type": "object",
"properties": {
"error_code": {
"description": "The code to be used for the additional check specified",
"type": "string"
},
"error_message": {
"description": "The message to be displayed for the additional check specified.",
"type": "string"
}
},
"required": [
"error_code",
"error_message"
],
"additionalProperties": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"title": "Keyword Arguments used across all CSV readers",
"description": "Arguments present in all CSV readers available.",
"type": "object",
"anyOf": [
{
"$ref": "global_reader_args.schema.json"
}
],
"properties": {
"field_check": {
"type": "string",
Expand All @@ -13,14 +18,6 @@
"false"
]
},
"field_check_error_code": {
"type": "string",
"description": "Allows you to customise the error code generated in the error report when the field check fails."
},
"field_check_error_message": {
"type": "string",
"description": "Allows you to customise the error message generated in the error report when the field check fails."
},
"null_empty_strings": {
"type": "boolean",
"description": "Converts empty string values into 'Null' values."
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "data-ingest:contract/components/reader_constraints/global_reader_args.schema.json",
"title": "Keyword Arguments used across all readers",
"description": "Arguments present in all readers available.",
"type": "object",
"properties": {
"ft_error_code": {
"type": "string",
"description": "Error code to raise when a reader is unable to read the contents of a file.",
"minLength": 1
},
"ft_error_message": {
"type": "string",
"description": "Error message to raise when a reader is unable to read the contents of a file.",
"minLength": 1
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"title": "Keyword Arguments used across all XML readers",
"description": "Arguments present in all XML readers.",
"type": "object",
"anyOf": [
{
"$ref": "global_reader_args.schema.json"
}
],
"properties": {
"record_tag": {
"type": "string",
Expand Down Expand Up @@ -40,14 +45,6 @@
"type": "string",
"description": "The Relative path (to the dischema) for the XSD document."
},
"xsd_error_code": {
"type": "string",
"description": "Allows you to customise the error code generated in the error report when the XSD check fails."
},
"xsd_error_message": {
"type": "string",
"description": "Allows you to customise the error message generated in the error report when the XSD check fails."
},
"rules_location": {
"type": "string",
"description": "Allows you to prefix the directory which contains the XSD document."
Expand Down
3 changes: 3 additions & 0 deletions docs/advanced_guidance/json_schemas/dataset.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
},
"transformations": {
"$ref": "transformations/transformations.schema.json"
},
"entity_relationships": {
"$ref": "entity_relationships.schema.json"
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "data-ingest:entity_relationships.schema.json",
"title": "entity_relationships",
"description": "Description of relationships to link normalised entities back to parent entities.",
"type": "object",
"patternProperties": {
"^[A-Za-z0-9_]+.$": {
"type": "object",
"properties": {
"parent_entity": {
"type": "string"
},
"join_fields": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"is_root_entity": {
"type": "boolean"
},
"mandatory": {
"type": "boolean"
},
"missing_parent_id_error_code": {
"type": "string"
},
"missing_parent_id_error_message": {
"type": "string"
},
"no_valid_records_error_code": {
"type": "string"
},
"no_valid_records_error_message": {
"type": "string"
},
"empty_entity_error_code": {
"type": "string",
"minLength": 1
},
"empty_entity_error_message": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
}
}
}
1 change: 1 addition & 0 deletions docs/advanced_guidance/package_documentation/auditing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
- get_all_business_rule_submissions
- get_all_error_report_submissions
- get_current_processing_info
show_root_toc_entry: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: Business Rules Documentation
---

<div class="grid cards" markdown>

- :material-language-python:{ .lg .middle } __Operations__

---

[:octicons-arrow-right-24: Read about the `Operation` objects here](operations.md)

- :material-language-python:{ .lg .middle } __Reference Data Loaders__

---

[:octicons-arrow-right-24: Read about the `Business Rules` objects here](refdata_loaders.md)

- :material-language-python:{ .lg .middle } __Reference Data Types__

---

[:octicons-arrow-right-24: Read about the `Data Contract` objects here](reference_data_types.md)

- :material-language-python:{ .lg .middle } __User Defined Functions (UDFs)__

---

[:octicons-arrow-right-24: Read about the `UDFs` objects here](udfs.md)

</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

!!! warning

Consider limiting how many UDFs you utilise in your rules as they can cause significant performance degredation when used on large datasets.

::: dve.core_engine.functions.implementations
handler: python
options:
show_root_heading: true
heading_level: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Data Contract Documentation
---

<div class="grid cards" markdown>

- :material-language-python:{ .lg .middle } __Readers__

---

[:octicons-arrow-right-24: Read about the `Readers` objects here](readers.md)

- :material-language-python:{ .lg .middle } __Domain Types__

---

[:octicons-arrow-right-24: Read about the `Domain Types` objects here](domain_types.md)


</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
::: dve.core_engine.configuration.v1.hierarchy
handler: python
options:
show_root_heading: true
heading_level: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

::: dve.core_engine.message
handler: python
options:
heading_level: 2
members:
- FeedbackMessage
- UserMessage
show_root_toc_entry: false
13 changes: 13 additions & 0 deletions docs/advanced_guidance/package_documentation/feedback/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: User Feedback Documentation
---

<div class="grid cards" markdown>

- :material-language-python:{ .lg .middle } __Feedback Messages__

---

[:octicons-arrow-right-24: Read about the `Operation` objects here](feedback_messages.md)

</div>
12 changes: 0 additions & 12 deletions docs/advanced_guidance/package_documentation/feedback_messages.md

This file was deleted.

38 changes: 34 additions & 4 deletions docs/advanced_guidance/package_documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,46 @@ title: Package Documentation

<div class="grid cards" markdown>

- :material-language-python:{ .lg .middle } __Pipeline__
- :material-database-plus:{ .lg .middle } __Auditing__

---

[:octicons-arrow-right-24: Read about the `Pipeline` objects here](pipeline.md)
[:octicons-arrow-right-24: Read about the `Auditing` objects here](auditing.md)

- :material-clipboard-check:{ .lg .middle } __Business Rules__

---

[:octicons-arrow-right-24: Read about the `Business Rules` objects here](./business_rules/index.md)

- :material-file-document-check:{ .lg .middle } __Data Contract__

---

[:octicons-arrow-right-24: Read about the `Data Contract` objects here](./data_contract/index.md)

- :material-relation-one-to-many:{ .lg .middle } __Entity Relationships__

---

[:octicons-arrow-right-24: Read about the `Entity Reliationships` objects here](entity_hierarchy.md)

- :material-message-alert:{ .lg .middle } __Submission Feedback__

---

[:octicons-arrow-right-24: Read about the `Submission Feedback` objects here](./feedback/index.md)

- :material-set-all:{ .lg .middle } __Reference Data Loader__
- :material-package-variant-plus:{ .lg .middle } __Additional Objects__

---

[:octicons-arrow-right-24: Read about the `Reference Data Loader` objects here](refdata_loaders.md)
[:octicons-arrow-right-24: Read about the additional objects here](./other/index.md)

- :material-pipe:{ .lg .middle } __Pipeline__

---

[:octicons-arrow-right-24: Read about the `Pipeline` objects here](pipeline.md)

</div>
13 changes: 13 additions & 0 deletions docs/advanced_guidance/package_documentation/other/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Additional Objects Documentation
---

<div class="grid cards" markdown>

- :material-code-braces-box:{ .lg .middle } __Models__

---

[:octicons-arrow-right-24: Read about the Model objects here](./models.md)

</div>
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
::: dve.core_engine.models
handler: python
options:
show_root_heading: true
heading_level: 2
members:
- SubmissionInfo
show_root_toc_entry: false
Loading
Loading