google-pso-data-validator 7.0.0__tar.gz → 7.1.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-7.0.0 → google_pso_data_validator-7.1.0}/PKG-INFO +11 -2
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/__main__.py +2 -2
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/clients.py +19 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/raw_query.py +8 -8
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/google_pso_data_validator.egg-info/PKG-INFO +11 -2
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/setup.py +1 -1
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_oracle/registry.py +4 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_postgres/datatypes.py +15 -1
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/LICENSE +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/README.md +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/app.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/cli_tools.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/client_info.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/combiner.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/config_manager.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/consts.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/data_validation.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/exceptions.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/find_tables.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/gcs_helper.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/jellyfish_distance.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/metadata.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/partition_builder.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/query_builder/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/query_builder/partition_row_builder.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/query_builder/query_builder.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/query_builder/random_row_builder.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/result_handlers/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/result_handlers/bigquery.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/result_handlers/text.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/schema_validation.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/secret_manager.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/state_manager.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/util.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/validation_builder.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/google_pso_data_validator.egg-info/SOURCES.txt +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/google_pso_data_validator.egg-info/dependency_links.txt +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/google_pso_data_validator.egg-info/entry_points.txt +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/google_pso_data_validator.egg-info/requires.txt +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/google_pso_data_validator.egg-info/top_level.txt +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/setup.cfg +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_addon/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_addon/api.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_addon/operations.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_biquery/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_biquery/api.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_cloud_spanner/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_cloud_spanner/api.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_cloud_spanner/client.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_cloud_spanner/compiler.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_cloud_spanner/datatypes.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_cloud_spanner/registry.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_cloud_spanner/tests/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_cloud_spanner/tests/conftest.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_cloud_spanner/to_pandas.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_db2/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_db2/api.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_db2/compiler.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_db2/datatypes.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_db2/registry.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_impala/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_impala/api.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_mssql/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_mssql/api.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_mssql/datatypes.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_mssql/registry.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_mysql/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_mysql/base_sql_compiler/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_mysql/base_sql_compiler/select_builder.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_mysql/compiler.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_oracle/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_oracle/api.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_oracle/compiler.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_oracle/datatypes.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_postgres/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_postgres/client.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_redshift/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_redshift/api.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_redshift/compiler.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_snowflake/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_snowflake/api.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_snowflake/datatypes.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_teradata/__init__.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_teradata/api.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_teradata/compiler.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_teradata/datatypes.py +0 -0
- {google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_teradata/registry.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: google-pso-data-validator
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.1.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
|
|
@@ -38,6 +38,15 @@ Provides-Extra: apache-airflow
|
|
|
38
38
|
Requires-Dist: 1.10.11; extra == "apache-airflow"
|
|
39
39
|
Provides-Extra: pyspark
|
|
40
40
|
Requires-Dist: 3.0.0; extra == "pyspark"
|
|
41
|
+
Dynamic: author
|
|
42
|
+
Dynamic: author-email
|
|
43
|
+
Dynamic: classifier
|
|
44
|
+
Dynamic: description
|
|
45
|
+
Dynamic: description-content-type
|
|
46
|
+
Dynamic: provides-extra
|
|
47
|
+
Dynamic: requires-dist
|
|
48
|
+
Dynamic: requires-python
|
|
49
|
+
Dynamic: summary
|
|
41
50
|
|
|
42
51
|
# Data Validation Tool
|
|
43
52
|
|
{google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/__main__.py
RENAMED
|
@@ -643,8 +643,8 @@ def run_connections(args):
|
|
|
643
643
|
elif args.connect_cmd == "add":
|
|
644
644
|
conn = cli_tools.get_connection_config_from_args(args)
|
|
645
645
|
# Test getting a client to validate connection details
|
|
646
|
-
|
|
647
|
-
|
|
646
|
+
with clients.get_data_client_ctx(conn) as _:
|
|
647
|
+
cli_tools.store_connection(args.connection_name, conn)
|
|
648
648
|
else:
|
|
649
649
|
raise ValueError(f"Connections Argument '{args.connect_cmd}' is not supported")
|
|
650
650
|
|
{google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/clients.py
RENAMED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
from contextlib import contextmanager
|
|
16
17
|
import copy
|
|
17
18
|
import logging
|
|
18
19
|
from typing import TYPE_CHECKING
|
|
@@ -317,6 +318,24 @@ def get_data_client(connection_config):
|
|
|
317
318
|
return data_client
|
|
318
319
|
|
|
319
320
|
|
|
321
|
+
@contextmanager
|
|
322
|
+
def get_data_client_ctx(*args, **kwargs):
|
|
323
|
+
"""Provide get_data_client() via a context manager."""
|
|
324
|
+
client = None
|
|
325
|
+
try:
|
|
326
|
+
client = get_data_client(*args, **kwargs)
|
|
327
|
+
yield client
|
|
328
|
+
finally:
|
|
329
|
+
# TODO When we upgrade Ibis beyond 5.x this try/except may become redundant.
|
|
330
|
+
# https://github.com/GoogleCloudPlatform/professional-services-data-validator/issues/1376
|
|
331
|
+
if hasattr(client, "close"):
|
|
332
|
+
try:
|
|
333
|
+
client.close()
|
|
334
|
+
except Exception as exc:
|
|
335
|
+
# No need to reraise, we can silently fail if exiting throws up an issue.
|
|
336
|
+
logging.warning("Exception closing connection: %s", str(exc))
|
|
337
|
+
|
|
338
|
+
|
|
320
339
|
def get_max_column_length(client):
|
|
321
340
|
"""Return the max column length supported by client.
|
|
322
341
|
|
{google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/raw_query.py
RENAMED
|
@@ -20,14 +20,14 @@ from data_validation import clients, state_manager
|
|
|
20
20
|
def run_raw_query_against_connection(args) -> list:
|
|
21
21
|
"""Return results of raw query for ad hoc usage."""
|
|
22
22
|
mgr = state_manager.StateManager()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
with clients.get_data_client_ctx(mgr.get_connection_config(args.conn)) as client:
|
|
24
|
+
cursor = client.raw_sql(args.query)
|
|
25
|
+
res = cursor.fetchall()
|
|
26
|
+
try:
|
|
27
|
+
cursor.close()
|
|
28
|
+
except Exception:
|
|
29
|
+
pass
|
|
30
|
+
return res
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def print_raw_query_output(query_output: list):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: google-pso-data-validator
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.1.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
|
|
@@ -38,6 +38,15 @@ Provides-Extra: apache-airflow
|
|
|
38
38
|
Requires-Dist: 1.10.11; extra == "apache-airflow"
|
|
39
39
|
Provides-Extra: pyspark
|
|
40
40
|
Requires-Dist: 3.0.0; extra == "pyspark"
|
|
41
|
+
Dynamic: author
|
|
42
|
+
Dynamic: author-email
|
|
43
|
+
Dynamic: classifier
|
|
44
|
+
Dynamic: description
|
|
45
|
+
Dynamic: description-content-type
|
|
46
|
+
Dynamic: provides-extra
|
|
47
|
+
Dynamic: requires-dist
|
|
48
|
+
Dynamic: requires-python
|
|
49
|
+
Dynamic: summary
|
|
41
50
|
|
|
42
51
|
# Data Validation Tool
|
|
43
52
|
|
|
@@ -154,6 +154,10 @@ def _cast(t, op):
|
|
|
154
154
|
"ELSE TO_NUMBER(NULL) END"
|
|
155
155
|
)
|
|
156
156
|
)
|
|
157
|
+
elif (arg_dtype.is_timestamp() or arg_dtype.is_date()) and typ.is_date():
|
|
158
|
+
# If we are casting to Date then simulate what all other engines
|
|
159
|
+
# understand to be a Date, which is without the time element.
|
|
160
|
+
return sa.func.cast(sa.func.TRUNC(sa_arg), sa.types.Date)
|
|
157
161
|
|
|
158
162
|
# Follow the original Ibis code path.
|
|
159
163
|
return sa_fixed_cast(t, op)
|
|
@@ -13,10 +13,24 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
import ibis.expr.datatypes as dt
|
|
16
|
+
from sqlalchemy.sql import sqltypes
|
|
16
17
|
from sqlalchemy.dialects import postgresql
|
|
17
|
-
from sqlalchemy.dialects.postgresql.base import PGDialect
|
|
18
|
+
from sqlalchemy.dialects.postgresql.base import PGDialect, ischema_names
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class XML(sqltypes.TypeEngine):
|
|
22
|
+
__visit_name__ = "XML"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
ischema_names["xml"] = XML
|
|
18
26
|
|
|
19
27
|
|
|
20
28
|
@dt.dtype.register(PGDialect, postgresql.OID)
|
|
21
29
|
def sa_pg_oid(_, sa_type, nullable=True):
|
|
22
30
|
return dt.int32(nullable=nullable)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# Matching Ibis v9.2 behaviour and mapping PostgreSQL xml type to unknown.
|
|
34
|
+
@dt.dtype.register(PGDialect, XML)
|
|
35
|
+
def sa_pg_xml(_, sa_type, nullable=True):
|
|
36
|
+
return dt.Unknown(nullable=nullable)
|
|
File without changes
|
|
File without changes
|
{google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/cli_tools.py
RENAMED
|
File without changes
|
{google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/client_info.py
RENAMED
|
File without changes
|
{google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/combiner.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/consts.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/exceptions.py
RENAMED
|
File without changes
|
{google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/find_tables.py
RENAMED
|
File without changes
|
{google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/gcs_helper.py
RENAMED
|
File without changes
|
|
File without changes
|
{google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/metadata.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/data_validation/state_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_pso_data_validator-7.0.0 → google_pso_data_validator-7.1.0}/third_party/ibis/ibis_db2/api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|