neco-dq-framework 1.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- neco_dq_framework-1.4.1/LICENSE +201 -0
- neco_dq_framework-1.4.1/LICENSES/Apache-2.0.txt +73 -0
- neco_dq_framework-1.4.1/NOTICE +15 -0
- neco_dq_framework-1.4.1/PKG-INFO +290 -0
- neco_dq_framework-1.4.1/README.md +245 -0
- neco_dq_framework-1.4.1/THIRD_PARTY_NOTICES.txt +1194 -0
- neco_dq_framework-1.4.1/neco_dq/__init__.py +5 -0
- neco_dq_framework-1.4.1/neco_dq/config/__init__.py +3 -0
- neco_dq_framework-1.4.1/neco_dq/config/config_resolver.py +595 -0
- neco_dq_framework-1.4.1/neco_dq/config/context.py +80 -0
- neco_dq_framework-1.4.1/neco_dq/config/ge/ge_standard_template.yaml +78 -0
- neco_dq_framework-1.4.1/neco_dq/config/profile_loader.py +246 -0
- neco_dq_framework-1.4.1/neco_dq/config/silver/silver_standard_template.yaml +79 -0
- neco_dq_framework-1.4.1/neco_dq/config/template_registry.yaml +3 -0
- neco_dq_framework-1.4.1/neco_dq/core/__init__.py +3 -0
- neco_dq_framework-1.4.1/neco_dq/core/alerts/__init__.py +3 -0
- neco_dq_framework-1.4.1/neco_dq/core/alerts/slack_alerts.py +290 -0
- neco_dq_framework-1.4.1/neco_dq/core/io/__init__.py +3 -0
- neco_dq_framework-1.4.1/neco_dq/core/io/result_writer.py +136 -0
- neco_dq_framework-1.4.1/neco_dq/core/metrics/expected.py +509 -0
- neco_dq_framework-1.4.1/neco_dq/core/metrics/observed.py +1047 -0
- neco_dq_framework-1.4.1/neco_dq/core/metrics/operators.py +105 -0
- neco_dq_framework-1.4.1/neco_dq/core/orchestrators/__init__.py +3 -0
- neco_dq_framework-1.4.1/neco_dq/core/orchestrators/dq_orchestrator.py +265 -0
- neco_dq_framework-1.4.1/neco_dq/core/policy/dq_failure_policy.py +104 -0
- neco_dq_framework-1.4.1/neco_dq/core/policy/exit_codes.py +12 -0
- neco_dq_framework-1.4.1/neco_dq/core/policy/policy_result.py +12 -0
- neco_dq_framework-1.4.1/neco_dq/core/registry/__init__.py +3 -0
- neco_dq_framework-1.4.1/neco_dq/core/registry/check_param_schema.py +634 -0
- neco_dq_framework-1.4.1/neco_dq/core/registry/test_suite_registry.py +178 -0
- neco_dq_framework-1.4.1/neco_dq/core/summary/__init__.py +3 -0
- neco_dq_framework-1.4.1/neco_dq/core/summary/summary_engine.py +253 -0
- neco_dq_framework-1.4.1/neco_dq/core/summary/terminal_logger.py +210 -0
- neco_dq_framework-1.4.1/neco_dq/dashboards/__init__.py +17 -0
- neco_dq_framework-1.4.1/neco_dq/dashboards/lakeview.py +606 -0
- neco_dq_framework-1.4.1/neco_dq/dashboards/templates/dq_dashboard.lvdash.json +5 -0
- neco_dq_framework-1.4.1/neco_dq/runner.py +159 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/__init__.py +8 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/base_test_suite.py +1835 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/bronze/__init__.py +3 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/bronze/bronze_dq_test_suite.py +1302 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/ge/__init__.py +3 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/ge/ge_dq_test_suite.py +508 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/ge/ge_result_normalizer.py +496 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/ge/ge_suite_builder.py +513 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/gold/__init__.py +3 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/gold/gold_dq_test_suite.py +1319 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/profiling/__init__.py +3 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/profiling/checks.py +263 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/profiling/column_stats.py +436 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/profiling/constants.py +87 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/profiling/cross_table.py +687 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/profiling/discovery.py +305 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/profiling/json_detection.py +215 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/profiling/modes.py +521 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/profiling/modular_output.py +243 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/profiling/profiling_dq_test_suite.py +222 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/profiling/suggestions_ge.py +225 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/profiling/suggestions_generic.py +141 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/profiling/suggestions_suites.py +685 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/profiling/summary.py +345 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/shared_checks/__init__.py +39 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/shared_checks/business_rules_check.py +88 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/shared_checks/compare_metric_check.py +204 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/shared_checks/distinct_count_check.py +144 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/shared_checks/freshness_check.py +103 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/shared_checks/json_schema_check.py +606 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/shared_checks/where_clause.py +14 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/silver/__init__.py +3 -0
- neco_dq_framework-1.4.1/neco_dq/test_suites/silver/silver_dq_test_suite.py +922 -0
- neco_dq_framework-1.4.1/neco_dq_framework.egg-info/PKG-INFO +290 -0
- neco_dq_framework-1.4.1/neco_dq_framework.egg-info/SOURCES.txt +75 -0
- neco_dq_framework-1.4.1/neco_dq_framework.egg-info/dependency_links.txt +1 -0
- neco_dq_framework-1.4.1/neco_dq_framework.egg-info/requires.txt +23 -0
- neco_dq_framework-1.4.1/neco_dq_framework.egg-info/top_level.txt +1 -0
- neco_dq_framework-1.4.1/pyproject.toml +289 -0
- neco_dq_framework-1.4.1/setup.cfg +4 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
95
|
+
Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Toyota Motor Corporation
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
10
|
+
|
|
11
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
12
|
+
|
|
13
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
14
|
+
|
|
15
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
16
|
+
|
|
17
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
18
|
+
|
|
19
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
20
|
+
|
|
21
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
22
|
+
|
|
23
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
24
|
+
|
|
25
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
26
|
+
|
|
27
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
28
|
+
|
|
29
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
30
|
+
|
|
31
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
32
|
+
|
|
33
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
34
|
+
|
|
35
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
36
|
+
|
|
37
|
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
38
|
+
|
|
39
|
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
40
|
+
|
|
41
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
|
42
|
+
|
|
43
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
44
|
+
|
|
45
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
46
|
+
|
|
47
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
48
|
+
|
|
49
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
50
|
+
|
|
51
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
52
|
+
|
|
53
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
54
|
+
|
|
55
|
+
END OF TERMS AND CONDITIONS
|
|
56
|
+
|
|
57
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
58
|
+
|
|
59
|
+
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
|
60
|
+
|
|
61
|
+
Copyright [yyyy] [name of copyright owner]
|
|
62
|
+
|
|
63
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
64
|
+
you may not use this file except in compliance with the License.
|
|
65
|
+
You may obtain a copy of the License at
|
|
66
|
+
|
|
67
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
68
|
+
|
|
69
|
+
Unless required by applicable law or agreed to in writing, software
|
|
70
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
71
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
72
|
+
See the License for the specific language governing permissions and
|
|
73
|
+
limitations under the License.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
neco-dq-framework
|
|
2
|
+
Copyright 2026 Toyota Motor Corporation
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
This product depends on software developed by third parties, including:
|
|
11
|
+
|
|
12
|
+
Great Expectations
|
|
13
|
+
Copyright Superconductive Health, Inc.
|
|
14
|
+
Licensed under the Apache License 2.0
|
|
15
|
+
https://github.com/great-expectations/great_expectations
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: neco-dq-framework
|
|
3
|
+
Version: 1.4.1
|
|
4
|
+
Summary: YAML-driven Data Quality framework for Databricks
|
|
5
|
+
Author: Claudio Basilico
|
|
6
|
+
Maintainer: Claudio Basilico
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
Project-URL: Homepage, https://github.com/woven-by-toyota/neco-dq-framework
|
|
9
|
+
Project-URL: Repository, https://github.com/woven-by-toyota/neco-dq-framework
|
|
10
|
+
Project-URL: Documentation, https://woven-by-toyota.github.io/neco-dq-framework/
|
|
11
|
+
Project-URL: Issues, https://github.com/woven-by-toyota/neco-dq-framework/issues
|
|
12
|
+
Keywords: data-quality,spark,databricks,great-expectations,data-validation
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
License-File: NOTICE
|
|
22
|
+
License-File: LICENSES/Apache-2.0.txt
|
|
23
|
+
License-File: THIRD_PARTY_NOTICES.txt
|
|
24
|
+
Requires-Dist: pyyaml>=6.0
|
|
25
|
+
Requires-Dist: jinja2>=3.1
|
|
26
|
+
Requires-Dist: great_expectations>=1.9.0
|
|
27
|
+
Requires-Dist: asteval>=0.9.30
|
|
28
|
+
Requires-Dist: pandas<3.0,>=2.0
|
|
29
|
+
Requires-Dist: packaging<26
|
|
30
|
+
Requires-Dist: marshmallow<4
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
33
|
+
Requires-Dist: pytest-cov>=5.0; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest-html>=4.0; extra == "dev"
|
|
35
|
+
Requires-Dist: allure-pytest>=2.13; extra == "dev"
|
|
36
|
+
Requires-Dist: pyspark>=3.5.0; extra == "dev"
|
|
37
|
+
Requires-Dist: ruff>=0.6.0; extra == "dev"
|
|
38
|
+
Requires-Dist: bump-my-version>=1.2.4; extra == "dev"
|
|
39
|
+
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
40
|
+
Provides-Extra: lint
|
|
41
|
+
Requires-Dist: ruff>=0.6.0; extra == "lint"
|
|
42
|
+
Provides-Extra: docs
|
|
43
|
+
Requires-Dist: mkdocs-material>=9.0; extra == "docs"
|
|
44
|
+
Dynamic: license-file
|
|
45
|
+
|
|
46
|
+
<p align="center">
|
|
47
|
+
<img src="https://raw.githubusercontent.com/woven-by-toyota/neco-dq-framework/main/docs/assets/logo.svg" alt="neco dq framework" width="600">
|
|
48
|
+
</p>
|
|
49
|
+
|
|
50
|
+
<p align="center">
|
|
51
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License"></a>
|
|
52
|
+
<a href="https://woven-by-toyota.github.io/neco-dq-framework/"><img src="https://img.shields.io/badge/docs-online-1c1c1c.svg" alt="Documentation"></a>
|
|
53
|
+
</p>
|
|
54
|
+
|
|
55
|
+
<p align="center">
|
|
56
|
+
<a href="https://woven-by-toyota.github.io/neco-dq-framework/getting-started/">Getting Started</a> •
|
|
57
|
+
<a href="https://woven-by-toyota.github.io/neco-dq-framework/contributing/changelog/">Changelog</a>
|
|
58
|
+
</p>
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
**Neco DQ** is a declarative data quality framework for Databricks, built on Spark and organized around the medallion architecture. You define checks in YAML, one set per layer, and the framework runs them, gates your pipeline on the result, and stores the history.
|
|
63
|
+
|
|
64
|
+
Neco DQ keeps the setup declarative: ~35 built-in checks covering ingestion, transformation, aggregation, and schema contracts, a policy engine that decides what blocks and what only warns, and [Great Expectations](https://greatexpectations.io/) when you need it. All in one report, one history table, one Slack alert. The same `run_dq()` call runs in a notebook, a scheduled Job, or a DLT pipeline.
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
─────────────────────────────────────────────────────────────────────────
|
|
68
|
+
DATA QUALITY SUMMARY
|
|
69
|
+
─────────────────────────────────────────────────────────────────────────
|
|
70
|
+
Suite Status Checks Pass Fail Tables
|
|
71
|
+
─────────────────────────────────────────────────────────────────────────
|
|
72
|
+
bronze WARN 11 10 1 2
|
|
73
|
+
silver WARN 17 15 2 2
|
|
74
|
+
gold FAIL 35 30 5 5
|
|
75
|
+
ge@silver PASS 110 110 0 2
|
|
76
|
+
ge@gold PASS 50 50 0 5
|
|
77
|
+
─────────────────────────────────────────────────────────────────────────
|
|
78
|
+
TOTALS 223 215 8 9 unique
|
|
79
|
+
|
|
80
|
+
Success Rate: 96.4% │ Status: FAIL (3 blocking)
|
|
81
|
+
─────────────────────────────────────────────────────────────────────────
|
|
82
|
+
DQ POLICY RESULT → exit_code=20 | DQ completed with ERRORS
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Why Neco DQ
|
|
86
|
+
|
|
87
|
+
| | Neco DQ | Other tools |
|
|
88
|
+
|---|---|---|
|
|
89
|
+
| Medallion-aware suites | yes | no |
|
|
90
|
+
| Pipeline gating (exit codes) | yes | partial |
|
|
91
|
+
| Multi-env profiles | yes | partial |
|
|
92
|
+
| Auto-profiling + config suggestion | yes | no |
|
|
93
|
+
| GE integration, unified report | yes | no |
|
|
94
|
+
| One-call dashboard generation (Lakeview) | yes | no |
|
|
95
|
+
| Pure YAML config, no Python required | yes | varies |
|
|
96
|
+
| Databricks-native (Unity Catalog, Volumes) | yes | partial |
|
|
97
|
+
|
|
98
|
+
## What it does
|
|
99
|
+
|
|
100
|
+
- **Layer-aware checks.** Bronze, Silver, and Gold suites, each with checks built for that stage. Around 35 checks in total, from `freshness` and `schema_drift` to `referential_integrity`, `reconciliation_expr`, and `trend`, plus a general-purpose `compare_metric` check for anything the named ones don't cover.
|
|
101
|
+
- **YAML configuration.** A single file for small setups, or a modular directory that splits policy, suites, and per-table groups as the config grows.
|
|
102
|
+
- **Pipeline gating.** A policy engine turns results into an exit code. Every check has a severity and a blocking flag, so you decide what stops a pipeline and what only warns. There's also a global failure-rate threshold.
|
|
103
|
+
- **Multi-environment profiles.** Define `dev`, `staging`, and `prod` profiles with their own catalogs, variables, and policy overrides. Configs reference them through Jinja2 (`{{ var.name }}`), so the same config runs everywhere.
|
|
104
|
+
- **Result history and alerts.** Results persist to Delta tables for tracking over time, and a Slack integration sends a run summary.
|
|
105
|
+
- **Dashboard generation.** One call builds a Databricks AI/BI (Lakeview) dashboard on top of the history table, with KPIs, coverage, a dimension matrix, regression and trend widgets, from a bundled template.
|
|
106
|
+
- **Runs anywhere on Databricks.** The same `run_dq()` call works in a notebook, a scheduled Job, or a DLT pipeline.
|
|
107
|
+
- **Auto-profiling.** Point it at a table and it profiles the data, flags things like high-null columns or possible PII, and suggests a starting config.
|
|
108
|
+
- **Custom suites.** Write your own checks in plain PySpark and plug them into the framework as a first-class suite. Custom checks go through the same policy engine, result persistence, and alerting as built-in ones. No glue code required.
|
|
109
|
+
- **Built-in debug experience.** When a check fails, the framework automatically generates an investigation query you can run directly in Databricks to inspect the offending rows, no manual digging. Each failure result includes the SQL, the failure statistics, and an execution trace so you know exactly what happened and where to look.
|
|
110
|
+
- **Tag-based filtering.** Tag any check with one or more labels and filter at runtime with `tags=["critical"]`. The same config can drive a full nightly run, a quick smoke test, and an on-demand critical-only check without changing a single YAML file.
|
|
111
|
+
- **Extensible.** Skip whole suites from the command line, filter by table, and compose configs with Jinja2 templates.
|
|
112
|
+
- **Great Expectations integration.** When native checks aren't enough, the framework integrates [Great Expectations](https://greatexpectations.io/). The GE suite adds a wide expectation catalogue: not-null, uniqueness, value ranges, regex patterns, value sets, row-count bounds, column-pair rules, and strict schema contracts that suit producer-consumer handoffs. GE results flow through the same policy engine, Delta persistence, and Slack alerting as every other check, so you get one unified report rather than two separate tools to reconcile.
|
|
113
|
+
|
|
114
|
+
## Philosophy
|
|
115
|
+
|
|
116
|
+
Every team has a different definition of "bad data". A missing field might be a hard pipeline blocker for one team and a non-critical warning for another. Neco DQ is built around that reality: the framework provides the checks, you decide what each one means.
|
|
117
|
+
|
|
118
|
+
Every check exposes three independent controls:
|
|
119
|
+
|
|
120
|
+
| Parameter | What it controls |
|
|
121
|
+
|-----------|-----------------|
|
|
122
|
+
| `severity` | How the failure is classified (`critical`, `error`, `warning`, `info`) |
|
|
123
|
+
| `blocking` | Whether a failure stops the pipeline (`exit_code=20`) or only warns (`exit_code=10`) |
|
|
124
|
+
| `enabled` | Whether the check runs at all |
|
|
125
|
+
|
|
126
|
+
On top of that, checks can be tagged and runs can be filtered by tag, so the same config can serve a full nightly run, a quick smoke test, and an on-demand critical-only check, without duplicating YAML.
|
|
127
|
+
|
|
128
|
+
**Data privacy by design.** The framework reads your data to run checks, but never stores it. Every check computes statistics, counts, and aggregates on the Spark DataFrame and only the results (numbers, pass/fail status, query templates) are persisted to Delta. Row-level values never leave your environment.
|
|
129
|
+
|
|
130
|
+
This extends naturally to multi-environment deployments through **profiles**. You define a single suite and a single set of checks, then let each profile (`dev`, `staging`, `prod`) override the values that differ per environment: catalog names, thresholds, blocking flags, or entire policy sections, without duplicating config. The same `freshness` check can tolerate a 48-hour delay in dev and enforce a strict 2-hour window in production, all from one YAML file.
|
|
131
|
+
|
|
132
|
+
## Requirements
|
|
133
|
+
|
|
134
|
+
- A Databricks environment with Unity Catalog (the intended runtime)
|
|
135
|
+
- Python 3.11 or newer
|
|
136
|
+
- For local development and running the test suite: PySpark 3.5 or newer
|
|
137
|
+
|
|
138
|
+
## Installation
|
|
139
|
+
|
|
140
|
+
In a Databricks notebook or job:
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
%pip install neco-dq-framework
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
You can also host the wheel on a Unity Catalog Volume, which is handy for pinning a version or working offline. Download it from PyPI once, upload the `.whl` to a Volume your workspace can read, then install from there:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
pip download neco-dq-framework --no-deps -d ./wheelhouse
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
```python
|
|
153
|
+
%pip install /Volumes/<catalog>/<schema>/wheelhouse/neco_dq_framework-X.Y.Z-py3-none-any.whl
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
For local development (running the test suite, contributing), clone the repo and install from source. Requires [uv](https://docs.astral.sh/uv/getting-started/installation/):
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
git clone https://github.com/woven-by-toyota/neco-dq-framework.git
|
|
160
|
+
cd neco-dq-framework
|
|
161
|
+
uv sync --extra dev --frozen
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
All subsequent commands (`ruff`, `pytest`) should be prefixed with `uv run` to run inside the managed environment.
|
|
165
|
+
|
|
166
|
+
## Quick start
|
|
167
|
+
|
|
168
|
+
```python
|
|
169
|
+
from neco_dq.runner import run_dq
|
|
170
|
+
|
|
171
|
+
run_dq("/path/to/dq_config.yaml")
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
A minimal config:
|
|
175
|
+
|
|
176
|
+
```yaml
|
|
177
|
+
- catalog: my_catalog
|
|
178
|
+
schema: silver
|
|
179
|
+
table: events
|
|
180
|
+
checks:
|
|
181
|
+
idempotency:
|
|
182
|
+
enabled: true # enable/disable this check
|
|
183
|
+
severity: critical # critical | error | warning | info
|
|
184
|
+
blocking: true # if true, a failure raises exit_code=20
|
|
185
|
+
tags: [daily, critical] # used to filter checks at runtime
|
|
186
|
+
key_columns: [id] # column(s) that must be unique
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
`run_dq` returns a summary dict and accepts a few options for controlling a run:
|
|
190
|
+
|
|
191
|
+
```python
|
|
192
|
+
run_dq(
|
|
193
|
+
"/path/to/config/",
|
|
194
|
+
profile="prod", # pick an environment profile
|
|
195
|
+
run_suites=["silver"], # or exclude_suites=[...]
|
|
196
|
+
tags=["critical"], # run only checks with this tag
|
|
197
|
+
)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
The exit decision follows the policy: `0` when everything passes, `10` when only non-blocking checks fail, `20` when a blocking check fails or the failure rate crosses the threshold.
|
|
201
|
+
|
|
202
|
+
## Modular configuration
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
config/
|
|
206
|
+
├── global/
|
|
207
|
+
├── policy.yaml
|
|
208
|
+
└── profiles.yaml
|
|
209
|
+
└── suites/
|
|
210
|
+
├── bronze/
|
|
211
|
+
│ ├── suite.yaml
|
|
212
|
+
│ └── test_groups/table_a.yaml
|
|
213
|
+
├── silver/
|
|
214
|
+
│ ├── suite.yaml
|
|
215
|
+
│ └── test_groups/table_b.yaml
|
|
216
|
+
│ └── great_expectations/table_b.yaml
|
|
217
|
+
└── gold/
|
|
218
|
+
├── suite.yaml
|
|
219
|
+
└── test_groups/table_c.yaml
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Test suites
|
|
223
|
+
|
|
224
|
+
| Suite | What it validates | Example checks |
|
|
225
|
+
|-------|-------------------|----------------|
|
|
226
|
+
| **Bronze** | Raw ingestion | `record_count`, `record_count_anomaly`, `freshness`, `schema_drift`, `mandatory_fields`, `partition_exists`, plus binary-payload checks |
|
|
227
|
+
| **Silver** | Transformation correctness | `idempotency`, `referential_integrity`, `cardinality`, `status_transition`, `totals_consistency`, `cross_table_equality`, `temporal_consistency`, `flow_completeness`, `compare_metric` |
|
|
228
|
+
| **Gold** | Aggregation and reconciliation | `uniqueness`, `completeness`, `coverage`, `volume`, `trend`, `reconciliation_expr`, `cross_gold`, `compare_metric` |
|
|
229
|
+
| **Profiling** | Auto-suggest checks from data | Scans a table and understands its shape (null ratios, cardinality, value distributions, potential PII), then automatically suggests a ready-to-use DQ config tailored to that table. The fastest way to bootstrap quality checks on a new dataset |
|
|
230
|
+
| **Great Expectations** | Schema and data contracts | Built on [Great Expectations](https://greatexpectations.io/): not-null, uniqueness, ranges, regex, value sets, row-count bounds, column-pair rules. Results flow through the same policy, persistence, and alerting as native checks |
|
|
231
|
+
|
|
232
|
+
### The `compare_metric` check
|
|
233
|
+
|
|
234
|
+
Most checks answer a fixed question. `compare_metric` is the general-purpose one: you define a value to *observe* from the data and a value to *expect*, and it compares them. It's available in the Silver and Gold suites for the cases the named checks don't cover.
|
|
235
|
+
|
|
236
|
+
The observed value can be a count, an aggregate, a ratio, array statistics, a raw SQL result, or a ranking metric like Kendall's W or Borda count. The expected value can be a static number or pulled dynamically from another query or table. The two are compared with an operator such as `==`, `between`, `within_pct`, or `~` for approximate matches.
|
|
237
|
+
|
|
238
|
+
```yaml
|
|
239
|
+
compare_metric:
|
|
240
|
+
enabled: true
|
|
241
|
+
metric:
|
|
242
|
+
type: aggregate
|
|
243
|
+
function: sum
|
|
244
|
+
column: amount
|
|
245
|
+
expected_from:
|
|
246
|
+
type: sql
|
|
247
|
+
query: "SELECT SUM(amount) FROM {{ var.catalog }}.silver.orders"
|
|
248
|
+
operator: within_pct
|
|
249
|
+
tolerance_abs: 0.5
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## Development
|
|
253
|
+
|
|
254
|
+
This project needs Python 3.11 or newer. Check your interpreter with `python --version` before you start.
|
|
255
|
+
|
|
256
|
+
The quickest way to get up and running:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
make test
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
This installs all dev dependencies (including PySpark) via `uv` and runs the full test suite.
|
|
263
|
+
|
|
264
|
+
For manual setup:
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
uv sync --extra dev --frozen
|
|
268
|
+
|
|
269
|
+
# Lint
|
|
270
|
+
uv run ruff check neco_dq/
|
|
271
|
+
uv run ruff format --check neco_dq/
|
|
272
|
+
|
|
273
|
+
# Run all tests
|
|
274
|
+
uv run pytest tests/ -v
|
|
275
|
+
|
|
276
|
+
# Run only unit tests (no Spark required)
|
|
277
|
+
uv run pytest tests/ -v -m "not spark"
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
See [CONTRIBUTING.md](https://github.com/woven-by-toyota/neco-dq-framework/blob/main/CONTRIBUTING.md) for the full contributor guide.
|
|
281
|
+
|
|
282
|
+
## Contributing
|
|
283
|
+
|
|
284
|
+
Contributions are welcome: bug reports, feature requests, new checks, or documentation improvements. See [CONTRIBUTING.md](https://github.com/woven-by-toyota/neco-dq-framework/blob/main/CONTRIBUTING.md) to get started.
|
|
285
|
+
|
|
286
|
+
Created and maintained by **Claudio Basilico**. Originally developed at Toyota Motor Corporation.
|
|
287
|
+
|
|
288
|
+
## License
|
|
289
|
+
|
|
290
|
+
Apache 2.0. See [LICENSE](LICENSE).
|