google-pso-data-validator 6.1.0__tar.gz → 6.3.0__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.
- {google_pso_data_validator-6.1.0/google_pso_data_validator.egg-info → google_pso_data_validator-6.3.0}/PKG-INFO +99 -47
- google_pso_data_validator-6.1.0/PKG-INFO → google_pso_data_validator-6.3.0/README.md +80 -69
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/__main__.py +62 -128
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/cli_tools.py +132 -64
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/clients.py +5 -1
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/combiner.py +34 -20
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/config_manager.py +101 -42
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/consts.py +1 -0
- google_pso_data_validator-6.3.0/data_validation/find_tables.py +148 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/partition_builder.py +2 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/query_builder/partition_row_builder.py +9 -3
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/query_builder/query_builder.py +5 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/result_handlers/bigquery.py +1 -1
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/result_handlers/text.py +1 -1
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/secret_manager.py +9 -5
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/validation_builder.py +0 -2
- google_pso_data_validator-6.1.0/README.md → google_pso_data_validator-6.3.0/google_pso_data_validator.egg-info/PKG-INFO +121 -23
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/google_pso_data_validator.egg-info/SOURCES.txt +1 -0
- google_pso_data_validator-6.3.0/google_pso_data_validator.egg-info/requires.txt +26 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/setup.py +21 -28
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_addon/api.py +21 -2
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_addon/operations.py +17 -5
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_db2/registry.py +2 -1
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_oracle/__init__.py +45 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_oracle/datatypes.py +2 -2
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_oracle/registry.py +9 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_postgres/client.py +7 -1
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_teradata/registry.py +36 -0
- google_pso_data_validator-6.1.0/google_pso_data_validator.egg-info/requires.txt +0 -31
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/LICENSE +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/__init__.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/app.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/client_info.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/data_validation.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/exceptions.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/gcs_helper.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/jellyfish_distance.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/metadata.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/query_builder/__init__.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/query_builder/random_row_builder.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/result_handlers/__init__.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/schema_validation.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/data_validation/state_manager.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/google_pso_data_validator.egg-info/dependency_links.txt +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/google_pso_data_validator.egg-info/entry_points.txt +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/google_pso_data_validator.egg-info/top_level.txt +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/setup.cfg +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_addon/__init__.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_cloud_spanner/__init__.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_cloud_spanner/api.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_cloud_spanner/client.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_cloud_spanner/compiler.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_cloud_spanner/datatypes.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_cloud_spanner/registry.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_cloud_spanner/tests/__init__.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_cloud_spanner/tests/conftest.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_cloud_spanner/to_pandas.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_db2/__init__.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_db2/api.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_db2/compiler.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_db2/datatypes.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_impala/__init__.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_impala/api.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_mssql/__init__.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_mssql/api.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_mssql/datatypes.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_mssql/registry.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_mysql/__init__.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_mysql/base_sql_compiler/__init__.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_mysql/base_sql_compiler/select_builder.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_mysql/compiler.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_oracle/api.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_oracle/compiler.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_postgres/__init__.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_postgres/datatypes.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_redshift/__init__.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_redshift/api.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_redshift/compiler.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_snowflake/__init__.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_snowflake/api.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_snowflake/datatypes.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_teradata/__init__.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_teradata/api.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_teradata/compiler.py +0 -0
- {google_pso_data_validator-6.1.0 → google_pso_data_validator-6.3.0}/third_party/ibis/ibis_teradata/datatypes.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: google-pso-data-validator
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.3.0
|
|
4
4
|
Summary: A package to enable easy data validation
|
|
5
5
|
Author: PSO DVT Engineering team
|
|
6
6
|
Author-email: data-validator-eng@google.com
|
|
@@ -14,31 +14,26 @@ Classifier: Operating System :: OS Independent
|
|
|
14
14
|
Requires-Python: >=3.8
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
|
-
Requires-Dist:
|
|
18
|
-
Requires-Dist:
|
|
19
|
-
Requires-Dist:
|
|
20
|
-
Requires-Dist:
|
|
21
|
-
Requires-Dist:
|
|
22
|
-
Requires-Dist: google-
|
|
17
|
+
Requires-Dist: Flask>=2.2
|
|
18
|
+
Requires-Dist: fsspec>=2024.9.0
|
|
19
|
+
Requires-Dist: google-api-python-client>=2.144.0
|
|
20
|
+
Requires-Dist: google-cloud-bigquery>=3.25.0
|
|
21
|
+
Requires-Dist: google-cloud-bigquery-storage>=2.26.0
|
|
22
|
+
Requires-Dist: google-cloud-secret-manager>=2.20.2
|
|
23
|
+
Requires-Dist: google-cloud-spanner>=3.49.1
|
|
24
|
+
Requires-Dist: google-cloud-storage>=2.18.2
|
|
23
25
|
Requires-Dist: ibis-framework==5.1.0
|
|
24
|
-
Requires-Dist: impyla
|
|
25
|
-
Requires-Dist:
|
|
26
|
-
Requires-Dist:
|
|
27
|
-
Requires-Dist:
|
|
28
|
-
Requires-Dist:
|
|
29
|
-
Requires-Dist: pandas==1.5.3
|
|
30
|
-
Requires-Dist: proto-plus==1.22.3
|
|
26
|
+
Requires-Dist: impyla>=0.19.0
|
|
27
|
+
Requires-Dist: jellyfish>=1.1.0
|
|
28
|
+
Requires-Dist: pandas==2.0.3
|
|
29
|
+
Requires-Dist: parsy>=2.1
|
|
30
|
+
Requires-Dist: psycopg2-binary>=2.9.9
|
|
31
31
|
Requires-Dist: pyarrow==14.0.1
|
|
32
|
-
Requires-Dist: pydata-google-auth
|
|
33
|
-
Requires-Dist:
|
|
34
|
-
Requires-Dist:
|
|
35
|
-
Requires-Dist:
|
|
36
|
-
Requires-Dist:
|
|
37
|
-
Requires-Dist: jellyfish==1.0.0
|
|
38
|
-
Requires-Dist: tabulate==0.9.0
|
|
39
|
-
Requires-Dist: Flask==2.3.2
|
|
40
|
-
Requires-Dist: parsy==2.1
|
|
41
|
-
Requires-Dist: google-cloud-secret-manager>=2.16.0
|
|
32
|
+
Requires-Dist: pydata-google-auth>=1.8.2
|
|
33
|
+
Requires-Dist: PyMySQL>=1.1.1
|
|
34
|
+
Requires-Dist: PyYAML>=6.0.2
|
|
35
|
+
Requires-Dist: SQLAlchemy==1.4.49
|
|
36
|
+
Requires-Dist: tabulate>=0.9.0
|
|
42
37
|
Provides-Extra: apache-airflow
|
|
43
38
|
Requires-Dist: 1.10.11; extra == "apache-airflow"
|
|
44
39
|
Provides-Extra: pyspark
|
|
@@ -133,7 +128,12 @@ over all columns ('*') will only run over numeric columns, unless the
|
|
|
133
128
|
`--wildcard-include-string-len` or `--wildcard-include-timestamp` flags are present.
|
|
134
129
|
|
|
135
130
|
```
|
|
136
|
-
data-validation
|
|
131
|
+
data-validation
|
|
132
|
+
[--verbose or -v ]
|
|
133
|
+
Verbose logging
|
|
134
|
+
[--log-level or -ll]
|
|
135
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
136
|
+
validate column
|
|
137
137
|
--source-conn or -sc SOURCE_CONN
|
|
138
138
|
Source connection details
|
|
139
139
|
See: *Data Source Configurations* section for each data source
|
|
@@ -141,7 +141,7 @@ data-validation (--verbose or -v) (--log-level or -ll) validate column
|
|
|
141
141
|
Target connection details
|
|
142
142
|
See: *Connections* section for each data source
|
|
143
143
|
--tables-list or -tbls SOURCE_SCHEMA.SOURCE_TABLE=TARGET_SCHEMA.TARGET_TABLE
|
|
144
|
-
Comma separated list of tables in the form schema.table=target_schema.target_table
|
|
144
|
+
Comma separated list of tables in the form schema.table=target_schema.target_table. Or shorthand schema.* for all tables.
|
|
145
145
|
Target schema name and table name are optional.
|
|
146
146
|
i.e 'bigquery-public-data.new_york_citibike.citibike_trips'
|
|
147
147
|
[--grouped-columns or -gc GROUPED_COLUMNS]
|
|
@@ -182,6 +182,7 @@ data-validation (--verbose or -v) (--log-level or -ll) validate column
|
|
|
182
182
|
Format for stdout output. Supported formats are (text, csv, json, table). Defaults to table.
|
|
183
183
|
[--filter-status or -fs STATUSES_LIST]
|
|
184
184
|
Comma separated list of statuses to filter the validation results. Supported statuses are (success, fail). If no list is provided, all statuses are returned.
|
|
185
|
+
|
|
185
186
|
```
|
|
186
187
|
|
|
187
188
|
The default aggregation type is a 'COUNT *', which will run in addition to the validations you specify. To remove this default,
|
|
@@ -212,7 +213,12 @@ Under the hood, row validation uses
|
|
|
212
213
|
apply functions such as IFNULL() or RTRIM(). These can be edited in the YAML or JSON config file to customize your row validation.
|
|
213
214
|
|
|
214
215
|
```
|
|
215
|
-
data-validation
|
|
216
|
+
data-validation
|
|
217
|
+
[--verbose or -v ]
|
|
218
|
+
Verbose logging
|
|
219
|
+
[--log-level or -ll]
|
|
220
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
221
|
+
validate row
|
|
216
222
|
--source-conn or -sc SOURCE_CONN
|
|
217
223
|
Source connection details
|
|
218
224
|
See: *Data Source Configurations* section for each data source
|
|
@@ -261,17 +267,21 @@ data-validation (--verbose or -v) (--log-level or -ll) validate row
|
|
|
261
267
|
[--case-insensitive-match, -cim]
|
|
262
268
|
Performs a case insensitive match by adding an UPPER() before comparison.
|
|
263
269
|
```
|
|
264
|
-
#### Generate
|
|
270
|
+
#### Generate Partitions for Large Row Validations
|
|
265
271
|
|
|
266
|
-
When performing row validations, Data Validation Tool brings each row into memory and can run into MemoryError. Below is the command syntax for generating
|
|
272
|
+
When performing row validations, Data Validation Tool brings each row into memory and can run into MemoryError. Below is the command syntax for generating partitions in order to perform row validations on large dataset (table or custom-query) to alleviate MemoryError. Each partition contains a range of primary key(s) and the ranges of keys across partitions are distinct. The partitions have nearly equal number of rows. See *Primary Keys* section
|
|
267
273
|
|
|
268
|
-
The command generates and stores multiple YAML validations each representing a chunk of the large
|
|
274
|
+
The command generates and stores multiple YAML validations each representing a chunk of the large dataset using filters (`WHERE primary_key(s) >= X AND primary_key(s) < Y`) in YAML files. The parameter parts-per-file, specifies the number of validations in one YAML file. Each yaml file will have parts-per-file validations in it - except the last one which will contain the remaining partitions (i.e. parts-per-file may not divide partition-num evenly). You can then run the validations in the directory serially (or in parallel in multiple containers, VMs) with the `data-validation configs run --config-dir PATH` command as described [here](https://github.com/GoogleCloudPlatform/professional-services-data-validator#yaml-configuration-files).
|
|
269
275
|
|
|
270
|
-
The command takes the same parameters as required for `Row Validation` *plus* a few parameters to support partitioning. Single and multiple primary keys are supported and keys can be of any indexable type, except for date and timestamp type. A parameter used in earlier versions, ```partition-key``` is no longer supported.
|
|
276
|
+
The command takes the same parameters as required for `Row Validation` *plus* a few parameters to support partitioning. Single and multiple primary keys are supported and keys can be of any indexable type, except for date and timestamp type. You can specify tables that are being validated or the source and target custom query. A parameter used in earlier versions, ```partition-key``` is no longer supported.
|
|
271
277
|
|
|
272
278
|
```
|
|
273
|
-
data-validation
|
|
274
|
-
|
|
279
|
+
data-validation
|
|
280
|
+
[--verbose or -v ]
|
|
281
|
+
Verbose logging
|
|
282
|
+
[--log-level or -ll]
|
|
283
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
284
|
+
generate-table-partitions
|
|
275
285
|
--source-conn or -sc SOURCE_CONN
|
|
276
286
|
Source connection details
|
|
277
287
|
See: *Data Source Configurations* section for each data source
|
|
@@ -282,6 +292,17 @@ data-validation (--verbose or -v) (--log-level or -ll) generate-table-partitions
|
|
|
282
292
|
Comma separated list of tables in the form schema.table=target_schema.target_table
|
|
283
293
|
Target schema name and table name are optional.
|
|
284
294
|
i.e 'bigquery-public-data.new_york_citibike.citibike_trips'
|
|
295
|
+
Either --tables-list or --source-query (or file) and --target-query (or file) must be provided
|
|
296
|
+
--source-query SOURCE_QUERY, -sq SOURCE_QUERY
|
|
297
|
+
Source sql query
|
|
298
|
+
Either --tables-list or --source-query (or file) and --target-query (or file) must be provided
|
|
299
|
+
--source-query-file SOURCE_QUERY_FILE, -sqf SOURCE_QUERY_FILE
|
|
300
|
+
File containing the source sql command. Supports GCS and local paths.
|
|
301
|
+
--target-query TARGET_QUERY, -tq TARGET_QUERY
|
|
302
|
+
Target sql query
|
|
303
|
+
Either --tables-list or --source-query (or file) and --target-query (or file) must be provided
|
|
304
|
+
--target-query-file TARGET_QUERY_FILE, -tqf TARGET_QUERY_FILE
|
|
305
|
+
File containing the target sql command. Supports GCS and local paths.
|
|
285
306
|
--primary-keys PRIMARY_KEYS, -pk PRIMARY_KEYS
|
|
286
307
|
Comma separated list of primary key columns 'col_a,col_b'. See *Primary Keys* section
|
|
287
308
|
--comparison-fields or -comp-fields FIELDS
|
|
@@ -293,7 +314,8 @@ data-validation (--verbose or -v) (--log-level or -ll) generate-table-partitions
|
|
|
293
314
|
Directory Path to store YAML Config Files
|
|
294
315
|
GCS: Provide a full gs:// path of the target directory. Eg: `gs://<BUCKET>/partitions_dir`
|
|
295
316
|
Local: Provide a relative path of the target directory. Eg: `partitions_dir`
|
|
296
|
-
|
|
317
|
+
If invoked with -tbls parameter, the validations are stored in a directory named <schema>.<table>, otherwise the directory is named `custom.<random_string>`
|
|
318
|
+
--partition-num INT, -pn INT
|
|
297
319
|
Number of partitions into which the table should be split, e.g. 1000 or 10000
|
|
298
320
|
In case this value exceeds the row count of the source/target table, it will be decreased to max(source_row_count, target_row_count)
|
|
299
321
|
[--bq-result-handler or -bqrh PROJECT_ID.DATASET.TABLE]
|
|
@@ -301,7 +323,7 @@ data-validation (--verbose or -v) (--log-level or -ll) generate-table-partitions
|
|
|
301
323
|
See: *Validation Reports* section
|
|
302
324
|
[--service-account or -sa PATH_TO_SA_KEY]
|
|
303
325
|
Service account to use for BigQuery result handler output.
|
|
304
|
-
[--parts-per-file INT], [-ppf INT]
|
|
326
|
+
[--parts-per-file INT], [-ppf INT]
|
|
305
327
|
Number of partitions in a yaml file, default value 1.
|
|
306
328
|
[--filters SOURCE_FILTER:TARGET_FILTER]
|
|
307
329
|
Colon separated string values of source and target filters.
|
|
@@ -326,7 +348,12 @@ types between source and target.
|
|
|
326
348
|
Note: An exclamation point before a data type (`!string`) signifies the column is non-nullable or required.
|
|
327
349
|
|
|
328
350
|
```
|
|
329
|
-
data-validation
|
|
351
|
+
data-validation
|
|
352
|
+
[--verbose or -v ]
|
|
353
|
+
Verbose logging
|
|
354
|
+
[--log-level or -ll]
|
|
355
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
356
|
+
validate schema
|
|
330
357
|
--source-conn or -sc SOURCE_CONN
|
|
331
358
|
Source connection details
|
|
332
359
|
See: *Data Source Configurations* section for each data source
|
|
@@ -334,7 +361,7 @@ data-validation (--verbose or -v) (--log-level or -ll) validate schema
|
|
|
334
361
|
Target connection details
|
|
335
362
|
See: *Connections* section for each data source
|
|
336
363
|
--tables-list or -tbls SOURCE_SCHEMA.SOURCE_TABLE=TARGET_SCHEMA.TARGET_TABLE
|
|
337
|
-
Comma separated list of tables in the form schema.table=target_schema.target_table
|
|
364
|
+
Comma separated list of tables in the form schema.table=target_schema.target_table. Or shorthand schema.* for all tables.
|
|
338
365
|
Target schema name and table name are optional.
|
|
339
366
|
e.g.: 'bigquery-public-data.new_york_citibike.citibike_trips'
|
|
340
367
|
[--bq-result-handler or -bqrh PROJECT_ID.DATASET.TABLE]
|
|
@@ -367,7 +394,12 @@ data-validation (--verbose or -v) (--log-level or -ll) validate schema
|
|
|
367
394
|
Below is the command syntax for custom query column validations.
|
|
368
395
|
|
|
369
396
|
```
|
|
370
|
-
data-validation
|
|
397
|
+
data-validation
|
|
398
|
+
[--verbose or -v ]
|
|
399
|
+
Verbose logging
|
|
400
|
+
[--log-level or -ll]
|
|
401
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
402
|
+
validate custom-query column
|
|
371
403
|
--source-conn or -sc SOURCE_CONN
|
|
372
404
|
Source connection details
|
|
373
405
|
See: *Data Source Configurations* section for each data source
|
|
@@ -429,7 +461,12 @@ in the SELECT statement of both source_query.sql and target_query.sql. See *Pri
|
|
|
429
461
|
Below is the command syntax for custom query row validations.
|
|
430
462
|
|
|
431
463
|
```
|
|
432
|
-
data-validation
|
|
464
|
+
data-validation
|
|
465
|
+
[--verbose or -v ]
|
|
466
|
+
Verbose logging
|
|
467
|
+
[--log-level or -ll]
|
|
468
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
469
|
+
validate custom-query row
|
|
433
470
|
--source-conn or -sc SOURCE_CONN
|
|
434
471
|
Source connection details
|
|
435
472
|
See: *Data Source Configurations* section for each data source
|
|
@@ -487,7 +524,12 @@ The `validate` command takes a `--dry-run` command line flag that prints source
|
|
|
487
524
|
and target SQL to stdout as JSON in lieu of performing a validation:
|
|
488
525
|
|
|
489
526
|
```
|
|
490
|
-
data-validation
|
|
527
|
+
data-validation
|
|
528
|
+
[--verbose or -v ]
|
|
529
|
+
Verbose logging
|
|
530
|
+
[--log-level or -ll]
|
|
531
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
532
|
+
validate
|
|
491
533
|
[--dry-run or -dr] Prints source and target SQL to stdout in lieu of performing a validation.
|
|
492
534
|
```
|
|
493
535
|
|
|
@@ -518,7 +560,12 @@ GCS and local paths.
|
|
|
518
560
|
You can use the `data-validation configs` command to run and view YAMLs.
|
|
519
561
|
|
|
520
562
|
```
|
|
521
|
-
data-validation
|
|
563
|
+
data-validation
|
|
564
|
+
[--verbose or -v ]
|
|
565
|
+
Verbose logging
|
|
566
|
+
[--log-level or -ll]
|
|
567
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
568
|
+
configs run
|
|
522
569
|
[--config-file or -c CONFIG_FILE]
|
|
523
570
|
Path to YAML config file to run. Supports local and GCS paths.
|
|
524
571
|
[--config-dir or -cdir CONFIG_DIR]
|
|
@@ -546,10 +593,10 @@ View the complete YAML file for a Grouped Column validation on the
|
|
|
546
593
|
|
|
547
594
|
### Scaling DVT
|
|
548
595
|
|
|
549
|
-
You can scale DVT for large
|
|
596
|
+
You can scale DVT for large validations by running the tool in a distributed manner. To optimize the validation speed for large tables, you can use GKE Jobs ([Google Kubernetes Jobs](https://cloud.google.com/kubernetes-engine/docs/how-to/deploying-workloads-overview#batch_jobs)) or [Cloud Run Jobs](https://cloud.google.com/run/docs/create-jobs). If you are not familiar with Kubernetes or Cloud Run Jobs, see [Scaling DVT with Distributed Jobs](https://github.com/GoogleCloudPlatform/professional-services-data-validator/blob/develop/docs/internal/distributed_jobs.md) for a detailed overview.
|
|
550
597
|
|
|
551
598
|
|
|
552
|
-
We recommend first generating
|
|
599
|
+
We recommend first generating partitions with the `generate-table-partitions` command for your large datasets (tables or queries). Then, use Cloud Run or GKE to distribute the validation of each chunk in parallel. See the [Cloud Run Jobs Quickstart sample](https://github.com/GoogleCloudPlatform/professional-services-data-validator/tree/develop/samples/cloud_run_jobs) to get started.
|
|
553
600
|
|
|
554
601
|
When running DVT in a distributed fashion, both the `--kube-completions` and `--config-dir` flags are required. The `--kube-completions` flag specifies that the validation is being run in indexed completion mode in Kubernetes or as multiple independent tasks in Cloud Run. If the `-kc` option is used and you are not running in indexed mode, you will receive a warning and the container will process all the validations sequentially. If the `-kc` option is used and a config directory is not provided (i.e. a `--config-file` is provided instead), a warning is issued.
|
|
555
602
|
|
|
@@ -684,10 +731,15 @@ resultset that breaks down the count of rows per calendar date.
|
|
|
684
731
|
Row level validations can involve either a hash/checksum, concat, or comparison fields.
|
|
685
732
|
A hash validation (`--hash '*'`) will first sanitize the data with the following
|
|
686
733
|
operations on all or selected columns: CAST to string, IFNULL replace with a default
|
|
687
|
-
replacement string
|
|
688
|
-
and run a SHA256() hash and compare the source and target results.
|
|
689
|
-
|
|
690
|
-
|
|
734
|
+
replacement string and RSTRIP. Then, it will CONCAT() the results
|
|
735
|
+
and run a SHA256() hash and compare the source and target results.
|
|
736
|
+
|
|
737
|
+
When there are data type mismatches for columns, for example dates compared to timestamps and
|
|
738
|
+
booleans compared with numeric columns, you may see other expressions in SQL statements which
|
|
739
|
+
ensure that consistent values are used to build comparison values.
|
|
740
|
+
|
|
741
|
+
Since each row will be returned in the result set if is recommended recommended to validate a
|
|
742
|
+
subset of the table. The `--filters` and `--use-random-row` options can be used for this purpose.
|
|
691
743
|
|
|
692
744
|
Please note that SHA256 is not a supported function on Teradata systems. If you wish to perform
|
|
693
745
|
this comparison on Teradata you will need to [deploy a UDF to perform the conversion](https://github.com/akuroda/teradata-udf-sha2/blob/master/src/sha256.c).
|
|
@@ -1,49 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: google-pso-data-validator
|
|
3
|
-
Version: 6.1.0
|
|
4
|
-
Summary: A package to enable easy data validation
|
|
5
|
-
Author: PSO DVT Engineering team
|
|
6
|
-
Author-email: data-validator-eng@google.com
|
|
7
|
-
Classifier: Development Status :: 4 - Beta
|
|
8
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
9
|
-
Classifier: Programming Language :: Python
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
-
Classifier: Operating System :: OS Independent
|
|
14
|
-
Requires-Python: >=3.8
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
License-File: LICENSE
|
|
17
|
-
Requires-Dist: attrs==23.1.0
|
|
18
|
-
Requires-Dist: grpcio==1.53.2
|
|
19
|
-
Requires-Dist: lazy-object-proxy==1.9.0
|
|
20
|
-
Requires-Dist: marshmallow==3.19.0
|
|
21
|
-
Requires-Dist: fsspec>=2022.8.2
|
|
22
|
-
Requires-Dist: google-api-python-client==2.91.0
|
|
23
|
-
Requires-Dist: ibis-framework==5.1.0
|
|
24
|
-
Requires-Dist: impyla==0.18.0
|
|
25
|
-
Requires-Dist: SQLAlchemy==1.4.49
|
|
26
|
-
Requires-Dist: PyMySQL==1.1.1
|
|
27
|
-
Requires-Dist: psycopg2-binary==2.9.6
|
|
28
|
-
Requires-Dist: PyYAML==6.0
|
|
29
|
-
Requires-Dist: pandas==1.5.3
|
|
30
|
-
Requires-Dist: proto-plus==1.22.3
|
|
31
|
-
Requires-Dist: pyarrow==14.0.1
|
|
32
|
-
Requires-Dist: pydata-google-auth==1.8.0
|
|
33
|
-
Requires-Dist: google-cloud-bigquery==3.11.3
|
|
34
|
-
Requires-Dist: google-cloud-bigquery-storage==2.20.0
|
|
35
|
-
Requires-Dist: google-cloud-spanner==3.36.0
|
|
36
|
-
Requires-Dist: google-cloud-storage==2.10.0
|
|
37
|
-
Requires-Dist: jellyfish==1.0.0
|
|
38
|
-
Requires-Dist: tabulate==0.9.0
|
|
39
|
-
Requires-Dist: Flask==2.3.2
|
|
40
|
-
Requires-Dist: parsy==2.1
|
|
41
|
-
Requires-Dist: google-cloud-secret-manager>=2.16.0
|
|
42
|
-
Provides-Extra: apache-airflow
|
|
43
|
-
Requires-Dist: 1.10.11; extra == "apache-airflow"
|
|
44
|
-
Provides-Extra: pyspark
|
|
45
|
-
Requires-Dist: 3.0.0; extra == "pyspark"
|
|
46
|
-
|
|
47
1
|
# Data Validation Tool
|
|
48
2
|
|
|
49
3
|
The Data Validation Tool is an open sourced Python CLI tool based on the
|
|
@@ -133,7 +87,12 @@ over all columns ('*') will only run over numeric columns, unless the
|
|
|
133
87
|
`--wildcard-include-string-len` or `--wildcard-include-timestamp` flags are present.
|
|
134
88
|
|
|
135
89
|
```
|
|
136
|
-
data-validation
|
|
90
|
+
data-validation
|
|
91
|
+
[--verbose or -v ]
|
|
92
|
+
Verbose logging
|
|
93
|
+
[--log-level or -ll]
|
|
94
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
95
|
+
validate column
|
|
137
96
|
--source-conn or -sc SOURCE_CONN
|
|
138
97
|
Source connection details
|
|
139
98
|
See: *Data Source Configurations* section for each data source
|
|
@@ -141,7 +100,7 @@ data-validation (--verbose or -v) (--log-level or -ll) validate column
|
|
|
141
100
|
Target connection details
|
|
142
101
|
See: *Connections* section for each data source
|
|
143
102
|
--tables-list or -tbls SOURCE_SCHEMA.SOURCE_TABLE=TARGET_SCHEMA.TARGET_TABLE
|
|
144
|
-
Comma separated list of tables in the form schema.table=target_schema.target_table
|
|
103
|
+
Comma separated list of tables in the form schema.table=target_schema.target_table. Or shorthand schema.* for all tables.
|
|
145
104
|
Target schema name and table name are optional.
|
|
146
105
|
i.e 'bigquery-public-data.new_york_citibike.citibike_trips'
|
|
147
106
|
[--grouped-columns or -gc GROUPED_COLUMNS]
|
|
@@ -182,6 +141,7 @@ data-validation (--verbose or -v) (--log-level or -ll) validate column
|
|
|
182
141
|
Format for stdout output. Supported formats are (text, csv, json, table). Defaults to table.
|
|
183
142
|
[--filter-status or -fs STATUSES_LIST]
|
|
184
143
|
Comma separated list of statuses to filter the validation results. Supported statuses are (success, fail). If no list is provided, all statuses are returned.
|
|
144
|
+
|
|
185
145
|
```
|
|
186
146
|
|
|
187
147
|
The default aggregation type is a 'COUNT *', which will run in addition to the validations you specify. To remove this default,
|
|
@@ -212,7 +172,12 @@ Under the hood, row validation uses
|
|
|
212
172
|
apply functions such as IFNULL() or RTRIM(). These can be edited in the YAML or JSON config file to customize your row validation.
|
|
213
173
|
|
|
214
174
|
```
|
|
215
|
-
data-validation
|
|
175
|
+
data-validation
|
|
176
|
+
[--verbose or -v ]
|
|
177
|
+
Verbose logging
|
|
178
|
+
[--log-level or -ll]
|
|
179
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
180
|
+
validate row
|
|
216
181
|
--source-conn or -sc SOURCE_CONN
|
|
217
182
|
Source connection details
|
|
218
183
|
See: *Data Source Configurations* section for each data source
|
|
@@ -261,17 +226,21 @@ data-validation (--verbose or -v) (--log-level or -ll) validate row
|
|
|
261
226
|
[--case-insensitive-match, -cim]
|
|
262
227
|
Performs a case insensitive match by adding an UPPER() before comparison.
|
|
263
228
|
```
|
|
264
|
-
#### Generate
|
|
229
|
+
#### Generate Partitions for Large Row Validations
|
|
265
230
|
|
|
266
|
-
When performing row validations, Data Validation Tool brings each row into memory and can run into MemoryError. Below is the command syntax for generating
|
|
231
|
+
When performing row validations, Data Validation Tool brings each row into memory and can run into MemoryError. Below is the command syntax for generating partitions in order to perform row validations on large dataset (table or custom-query) to alleviate MemoryError. Each partition contains a range of primary key(s) and the ranges of keys across partitions are distinct. The partitions have nearly equal number of rows. See *Primary Keys* section
|
|
267
232
|
|
|
268
|
-
The command generates and stores multiple YAML validations each representing a chunk of the large
|
|
233
|
+
The command generates and stores multiple YAML validations each representing a chunk of the large dataset using filters (`WHERE primary_key(s) >= X AND primary_key(s) < Y`) in YAML files. The parameter parts-per-file, specifies the number of validations in one YAML file. Each yaml file will have parts-per-file validations in it - except the last one which will contain the remaining partitions (i.e. parts-per-file may not divide partition-num evenly). You can then run the validations in the directory serially (or in parallel in multiple containers, VMs) with the `data-validation configs run --config-dir PATH` command as described [here](https://github.com/GoogleCloudPlatform/professional-services-data-validator#yaml-configuration-files).
|
|
269
234
|
|
|
270
|
-
The command takes the same parameters as required for `Row Validation` *plus* a few parameters to support partitioning. Single and multiple primary keys are supported and keys can be of any indexable type, except for date and timestamp type. A parameter used in earlier versions, ```partition-key``` is no longer supported.
|
|
235
|
+
The command takes the same parameters as required for `Row Validation` *plus* a few parameters to support partitioning. Single and multiple primary keys are supported and keys can be of any indexable type, except for date and timestamp type. You can specify tables that are being validated or the source and target custom query. A parameter used in earlier versions, ```partition-key``` is no longer supported.
|
|
271
236
|
|
|
272
237
|
```
|
|
273
|
-
data-validation
|
|
274
|
-
|
|
238
|
+
data-validation
|
|
239
|
+
[--verbose or -v ]
|
|
240
|
+
Verbose logging
|
|
241
|
+
[--log-level or -ll]
|
|
242
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
243
|
+
generate-table-partitions
|
|
275
244
|
--source-conn or -sc SOURCE_CONN
|
|
276
245
|
Source connection details
|
|
277
246
|
See: *Data Source Configurations* section for each data source
|
|
@@ -282,6 +251,17 @@ data-validation (--verbose or -v) (--log-level or -ll) generate-table-partitions
|
|
|
282
251
|
Comma separated list of tables in the form schema.table=target_schema.target_table
|
|
283
252
|
Target schema name and table name are optional.
|
|
284
253
|
i.e 'bigquery-public-data.new_york_citibike.citibike_trips'
|
|
254
|
+
Either --tables-list or --source-query (or file) and --target-query (or file) must be provided
|
|
255
|
+
--source-query SOURCE_QUERY, -sq SOURCE_QUERY
|
|
256
|
+
Source sql query
|
|
257
|
+
Either --tables-list or --source-query (or file) and --target-query (or file) must be provided
|
|
258
|
+
--source-query-file SOURCE_QUERY_FILE, -sqf SOURCE_QUERY_FILE
|
|
259
|
+
File containing the source sql command. Supports GCS and local paths.
|
|
260
|
+
--target-query TARGET_QUERY, -tq TARGET_QUERY
|
|
261
|
+
Target sql query
|
|
262
|
+
Either --tables-list or --source-query (or file) and --target-query (or file) must be provided
|
|
263
|
+
--target-query-file TARGET_QUERY_FILE, -tqf TARGET_QUERY_FILE
|
|
264
|
+
File containing the target sql command. Supports GCS and local paths.
|
|
285
265
|
--primary-keys PRIMARY_KEYS, -pk PRIMARY_KEYS
|
|
286
266
|
Comma separated list of primary key columns 'col_a,col_b'. See *Primary Keys* section
|
|
287
267
|
--comparison-fields or -comp-fields FIELDS
|
|
@@ -293,7 +273,8 @@ data-validation (--verbose or -v) (--log-level or -ll) generate-table-partitions
|
|
|
293
273
|
Directory Path to store YAML Config Files
|
|
294
274
|
GCS: Provide a full gs:// path of the target directory. Eg: `gs://<BUCKET>/partitions_dir`
|
|
295
275
|
Local: Provide a relative path of the target directory. Eg: `partitions_dir`
|
|
296
|
-
|
|
276
|
+
If invoked with -tbls parameter, the validations are stored in a directory named <schema>.<table>, otherwise the directory is named `custom.<random_string>`
|
|
277
|
+
--partition-num INT, -pn INT
|
|
297
278
|
Number of partitions into which the table should be split, e.g. 1000 or 10000
|
|
298
279
|
In case this value exceeds the row count of the source/target table, it will be decreased to max(source_row_count, target_row_count)
|
|
299
280
|
[--bq-result-handler or -bqrh PROJECT_ID.DATASET.TABLE]
|
|
@@ -301,7 +282,7 @@ data-validation (--verbose or -v) (--log-level or -ll) generate-table-partitions
|
|
|
301
282
|
See: *Validation Reports* section
|
|
302
283
|
[--service-account or -sa PATH_TO_SA_KEY]
|
|
303
284
|
Service account to use for BigQuery result handler output.
|
|
304
|
-
[--parts-per-file INT], [-ppf INT]
|
|
285
|
+
[--parts-per-file INT], [-ppf INT]
|
|
305
286
|
Number of partitions in a yaml file, default value 1.
|
|
306
287
|
[--filters SOURCE_FILTER:TARGET_FILTER]
|
|
307
288
|
Colon separated string values of source and target filters.
|
|
@@ -326,7 +307,12 @@ types between source and target.
|
|
|
326
307
|
Note: An exclamation point before a data type (`!string`) signifies the column is non-nullable or required.
|
|
327
308
|
|
|
328
309
|
```
|
|
329
|
-
data-validation
|
|
310
|
+
data-validation
|
|
311
|
+
[--verbose or -v ]
|
|
312
|
+
Verbose logging
|
|
313
|
+
[--log-level or -ll]
|
|
314
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
315
|
+
validate schema
|
|
330
316
|
--source-conn or -sc SOURCE_CONN
|
|
331
317
|
Source connection details
|
|
332
318
|
See: *Data Source Configurations* section for each data source
|
|
@@ -334,7 +320,7 @@ data-validation (--verbose or -v) (--log-level or -ll) validate schema
|
|
|
334
320
|
Target connection details
|
|
335
321
|
See: *Connections* section for each data source
|
|
336
322
|
--tables-list or -tbls SOURCE_SCHEMA.SOURCE_TABLE=TARGET_SCHEMA.TARGET_TABLE
|
|
337
|
-
Comma separated list of tables in the form schema.table=target_schema.target_table
|
|
323
|
+
Comma separated list of tables in the form schema.table=target_schema.target_table. Or shorthand schema.* for all tables.
|
|
338
324
|
Target schema name and table name are optional.
|
|
339
325
|
e.g.: 'bigquery-public-data.new_york_citibike.citibike_trips'
|
|
340
326
|
[--bq-result-handler or -bqrh PROJECT_ID.DATASET.TABLE]
|
|
@@ -367,7 +353,12 @@ data-validation (--verbose or -v) (--log-level or -ll) validate schema
|
|
|
367
353
|
Below is the command syntax for custom query column validations.
|
|
368
354
|
|
|
369
355
|
```
|
|
370
|
-
data-validation
|
|
356
|
+
data-validation
|
|
357
|
+
[--verbose or -v ]
|
|
358
|
+
Verbose logging
|
|
359
|
+
[--log-level or -ll]
|
|
360
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
361
|
+
validate custom-query column
|
|
371
362
|
--source-conn or -sc SOURCE_CONN
|
|
372
363
|
Source connection details
|
|
373
364
|
See: *Data Source Configurations* section for each data source
|
|
@@ -429,7 +420,12 @@ in the SELECT statement of both source_query.sql and target_query.sql. See *Pri
|
|
|
429
420
|
Below is the command syntax for custom query row validations.
|
|
430
421
|
|
|
431
422
|
```
|
|
432
|
-
data-validation
|
|
423
|
+
data-validation
|
|
424
|
+
[--verbose or -v ]
|
|
425
|
+
Verbose logging
|
|
426
|
+
[--log-level or -ll]
|
|
427
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
428
|
+
validate custom-query row
|
|
433
429
|
--source-conn or -sc SOURCE_CONN
|
|
434
430
|
Source connection details
|
|
435
431
|
See: *Data Source Configurations* section for each data source
|
|
@@ -487,7 +483,12 @@ The `validate` command takes a `--dry-run` command line flag that prints source
|
|
|
487
483
|
and target SQL to stdout as JSON in lieu of performing a validation:
|
|
488
484
|
|
|
489
485
|
```
|
|
490
|
-
data-validation
|
|
486
|
+
data-validation
|
|
487
|
+
[--verbose or -v ]
|
|
488
|
+
Verbose logging
|
|
489
|
+
[--log-level or -ll]
|
|
490
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
491
|
+
validate
|
|
491
492
|
[--dry-run or -dr] Prints source and target SQL to stdout in lieu of performing a validation.
|
|
492
493
|
```
|
|
493
494
|
|
|
@@ -518,7 +519,12 @@ GCS and local paths.
|
|
|
518
519
|
You can use the `data-validation configs` command to run and view YAMLs.
|
|
519
520
|
|
|
520
521
|
```
|
|
521
|
-
data-validation
|
|
522
|
+
data-validation
|
|
523
|
+
[--verbose or -v ]
|
|
524
|
+
Verbose logging
|
|
525
|
+
[--log-level or -ll]
|
|
526
|
+
Log Level to be assigned. Supported levels are (DEBUG,INFO,WARNING,ERROR,CRITICAL). Defaults to INFO.
|
|
527
|
+
configs run
|
|
522
528
|
[--config-file or -c CONFIG_FILE]
|
|
523
529
|
Path to YAML config file to run. Supports local and GCS paths.
|
|
524
530
|
[--config-dir or -cdir CONFIG_DIR]
|
|
@@ -546,10 +552,10 @@ View the complete YAML file for a Grouped Column validation on the
|
|
|
546
552
|
|
|
547
553
|
### Scaling DVT
|
|
548
554
|
|
|
549
|
-
You can scale DVT for large
|
|
555
|
+
You can scale DVT for large validations by running the tool in a distributed manner. To optimize the validation speed for large tables, you can use GKE Jobs ([Google Kubernetes Jobs](https://cloud.google.com/kubernetes-engine/docs/how-to/deploying-workloads-overview#batch_jobs)) or [Cloud Run Jobs](https://cloud.google.com/run/docs/create-jobs). If you are not familiar with Kubernetes or Cloud Run Jobs, see [Scaling DVT with Distributed Jobs](https://github.com/GoogleCloudPlatform/professional-services-data-validator/blob/develop/docs/internal/distributed_jobs.md) for a detailed overview.
|
|
550
556
|
|
|
551
557
|
|
|
552
|
-
We recommend first generating
|
|
558
|
+
We recommend first generating partitions with the `generate-table-partitions` command for your large datasets (tables or queries). Then, use Cloud Run or GKE to distribute the validation of each chunk in parallel. See the [Cloud Run Jobs Quickstart sample](https://github.com/GoogleCloudPlatform/professional-services-data-validator/tree/develop/samples/cloud_run_jobs) to get started.
|
|
553
559
|
|
|
554
560
|
When running DVT in a distributed fashion, both the `--kube-completions` and `--config-dir` flags are required. The `--kube-completions` flag specifies that the validation is being run in indexed completion mode in Kubernetes or as multiple independent tasks in Cloud Run. If the `-kc` option is used and you are not running in indexed mode, you will receive a warning and the container will process all the validations sequentially. If the `-kc` option is used and a config directory is not provided (i.e. a `--config-file` is provided instead), a warning is issued.
|
|
555
561
|
|
|
@@ -684,10 +690,15 @@ resultset that breaks down the count of rows per calendar date.
|
|
|
684
690
|
Row level validations can involve either a hash/checksum, concat, or comparison fields.
|
|
685
691
|
A hash validation (`--hash '*'`) will first sanitize the data with the following
|
|
686
692
|
operations on all or selected columns: CAST to string, IFNULL replace with a default
|
|
687
|
-
replacement string
|
|
688
|
-
and run a SHA256() hash and compare the source and target results.
|
|
689
|
-
|
|
690
|
-
|
|
693
|
+
replacement string and RSTRIP. Then, it will CONCAT() the results
|
|
694
|
+
and run a SHA256() hash and compare the source and target results.
|
|
695
|
+
|
|
696
|
+
When there are data type mismatches for columns, for example dates compared to timestamps and
|
|
697
|
+
booleans compared with numeric columns, you may see other expressions in SQL statements which
|
|
698
|
+
ensure that consistent values are used to build comparison values.
|
|
699
|
+
|
|
700
|
+
Since each row will be returned in the result set if is recommended recommended to validate a
|
|
701
|
+
subset of the table. The `--filters` and `--use-random-row` options can be used for this purpose.
|
|
691
702
|
|
|
692
703
|
Please note that SHA256 is not a supported function on Teradata systems. If you wish to perform
|
|
693
704
|
this comparison on Teradata you will need to [deploy a UDF to perform the conversion](https://github.com/akuroda/teradata-udf-sha2/blob/master/src/sha256.c).
|