datacontract-cli 0.10.23__py3-none-any.whl → 0.10.25__py3-none-any.whl
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.
Potentially problematic release.
This version of datacontract-cli might be problematic. Click here for more details.
- datacontract/__init__.py +13 -0
- datacontract/api.py +3 -3
- datacontract/catalog/catalog.py +2 -2
- datacontract/cli.py +1 -1
- datacontract/data_contract.py +5 -3
- datacontract/engines/data_contract_test.py +13 -4
- datacontract/engines/fastjsonschema/s3/s3_read_files.py +3 -2
- datacontract/engines/soda/check_soda_execute.py +16 -3
- datacontract/engines/soda/connections/duckdb_connection.py +61 -5
- datacontract/engines/soda/connections/kafka.py +3 -2
- datacontract/export/avro_converter.py +8 -1
- datacontract/export/bigquery_converter.py +1 -1
- datacontract/export/duckdb_type_converter.py +57 -0
- datacontract/export/great_expectations_converter.py +49 -2
- datacontract/export/odcs_v3_exporter.py +162 -136
- datacontract/export/protobuf_converter.py +163 -69
- datacontract/export/spark_converter.py +1 -1
- datacontract/imports/avro_importer.py +30 -5
- datacontract/imports/csv_importer.py +111 -57
- datacontract/imports/excel_importer.py +850 -0
- datacontract/imports/importer.py +5 -2
- datacontract/imports/importer_factory.py +10 -0
- datacontract/imports/odcs_v3_importer.py +226 -127
- datacontract/imports/protobuf_importer.py +264 -0
- datacontract/lint/linters/description_linter.py +1 -3
- datacontract/lint/linters/field_reference_linter.py +1 -2
- datacontract/lint/linters/notice_period_linter.py +2 -2
- datacontract/lint/linters/valid_constraints_linter.py +3 -3
- datacontract/lint/resolve.py +23 -8
- datacontract/model/data_contract_specification/__init__.py +1 -0
- datacontract/model/run.py +3 -0
- datacontract/output/__init__.py +0 -0
- datacontract/templates/datacontract.html +2 -1
- datacontract/templates/index.html +2 -1
- {datacontract_cli-0.10.23.dist-info → datacontract_cli-0.10.25.dist-info}/METADATA +305 -195
- {datacontract_cli-0.10.23.dist-info → datacontract_cli-0.10.25.dist-info}/RECORD +40 -38
- {datacontract_cli-0.10.23.dist-info → datacontract_cli-0.10.25.dist-info}/WHEEL +1 -1
- datacontract/export/csv_type_converter.py +0 -36
- datacontract/lint/linters/quality_schema_linter.py +0 -52
- datacontract/model/data_contract_specification.py +0 -327
- {datacontract_cli-0.10.23.dist-info → datacontract_cli-0.10.25.dist-info}/entry_points.txt +0 -0
- {datacontract_cli-0.10.23.dist-info → datacontract_cli-0.10.25.dist-info/licenses}/LICENSE +0 -0
- {datacontract_cli-0.10.23.dist-info → datacontract_cli-0.10.25.dist-info}/top_level.txt +0 -0
|
@@ -1,71 +1,73 @@
|
|
|
1
|
-
datacontract/__init__.py,sha256=
|
|
2
|
-
datacontract/api.py,sha256=
|
|
3
|
-
datacontract/cli.py,sha256=
|
|
4
|
-
datacontract/data_contract.py,sha256=
|
|
1
|
+
datacontract/__init__.py,sha256=ThDdxDJsd7qNErLoh628nK5M7RzhJNYCmN-C6BAJFoo,405
|
|
2
|
+
datacontract/api.py,sha256=031PVQbZGHPVpFLFHGQ-Igc5queVCnjAun6oxLDMIOo,8175
|
|
3
|
+
datacontract/cli.py,sha256=32f-hsUVUp_ArNbRB4uCr0dE-fxB5qpjB31lu_AbbmU,16863
|
|
4
|
+
datacontract/data_contract.py,sha256=unt7wnThY4qMtexdCc4fYU0gCEwdhDdYjHn_u_Ya6_Q,10740
|
|
5
5
|
datacontract/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
datacontract/breaking/breaking.py,sha256=DnqgxUjD-EAZcg5RBizOP9a2WxsFTaQBik0AB_m3K00,20431
|
|
7
7
|
datacontract/breaking/breaking_change.py,sha256=BIDEUo1U2CQLVT2-I5PyFttxAj6zQPI1UUkEoOOQXMY,2249
|
|
8
8
|
datacontract/breaking/breaking_rules.py,sha256=M9IdzVJSA7oOr1fvLQl0y9MoBKeItPz42Db2U2cjH2Y,4063
|
|
9
|
-
datacontract/catalog/catalog.py,sha256=
|
|
9
|
+
datacontract/catalog/catalog.py,sha256=nTamEVc_G7gRvz-jwt5aic0Kea8l7H60_JX1Sahn5vk,2727
|
|
10
10
|
datacontract/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
datacontract/engines/data_contract_checks.py,sha256=wjnKh1FxG9qXB1zOPjrGmjW7uCpRsxXICMIvyFwpVt4,26622
|
|
12
|
-
datacontract/engines/data_contract_test.py,sha256=
|
|
12
|
+
datacontract/engines/data_contract_test.py,sha256=NAnO_744H30tkQh43PSUSsAs3TC9DaNIWZe9jFKzA8Q,3242
|
|
13
13
|
datacontract/engines/datacontract/check_that_datacontract_contains_valid_servers_configuration.py,sha256=zrDn-_EJJ5kv0kZWAA-toeEPuBd3YQ0-U7Jb8euNUS8,1558
|
|
14
14
|
datacontract/engines/datacontract/check_that_datacontract_file_exists.py,sha256=Vw-7U0GmQT2127tybxggZfpRFiZVgoIh6ndkTGM0FP4,665
|
|
15
15
|
datacontract/engines/fastjsonschema/check_jsonschema.py,sha256=-knTZ-NsHpBWCoR7r1JP5iYSWx697mugijmqUPx0pEY,10307
|
|
16
|
-
datacontract/engines/fastjsonschema/s3/s3_read_files.py,sha256=
|
|
16
|
+
datacontract/engines/fastjsonschema/s3/s3_read_files.py,sha256=0sTDWvuu0AzSgn7fKWJxGaTmPww00TFYyDK-X0s5T3c,1193
|
|
17
17
|
datacontract/engines/soda/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
datacontract/engines/soda/check_soda_execute.py,sha256=
|
|
18
|
+
datacontract/engines/soda/check_soda_execute.py,sha256=SYJdPpkozOA62yTM7s6cfwLfgfxgGJptO5U-cShrtPk,8600
|
|
19
19
|
datacontract/engines/soda/connections/bigquery.py,sha256=C-8kxmzpYe88bJp80ObHFLMh4rpnIjnUQ7XOj0Ke7lk,903
|
|
20
20
|
datacontract/engines/soda/connections/databricks.py,sha256=cMRasuO0MrSKVgHPB-9uFTGTZPFg6z9Kpk3tJ0SdR0s,943
|
|
21
|
-
datacontract/engines/soda/connections/duckdb_connection.py,sha256=
|
|
22
|
-
datacontract/engines/soda/connections/kafka.py,sha256=
|
|
21
|
+
datacontract/engines/soda/connections/duckdb_connection.py,sha256=hy2HxktSSt1tFB7rVI7tDOe6WeTNvHSKqsEk9uIkntU,9114
|
|
22
|
+
datacontract/engines/soda/connections/kafka.py,sha256=icUcsGy9lFQRTz_mXD35tahFKIIxK5aS3RCzu_YfBaQ,8625
|
|
23
23
|
datacontract/engines/soda/connections/postgres.py,sha256=9GTF4Es3M5vb7ocSGqAxXmslvkS5CjsPQGIuo020CFc,626
|
|
24
24
|
datacontract/engines/soda/connections/snowflake.py,sha256=rfG2ysuqNM6TkvyqQKcGHFsTGJ6AROmud5VleUDRrb0,749
|
|
25
25
|
datacontract/engines/soda/connections/sqlserver.py,sha256=RzGLbCUdRyfmDcqtM_AB9WZ-Xk-XYX91nkXpVNpYbvc,1440
|
|
26
26
|
datacontract/engines/soda/connections/trino.py,sha256=JvKUP9aFg_n095oWE0-bGmfbETSWEOURGEZdQuG8txA,718
|
|
27
27
|
datacontract/export/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
-
datacontract/export/avro_converter.py,sha256=
|
|
28
|
+
datacontract/export/avro_converter.py,sha256=0_MOAwJYOMxQpmgYKSQ5TJjOTeuqVWfm4kTxmaSVH3A,4882
|
|
29
29
|
datacontract/export/avro_idl_converter.py,sha256=SGO7JfI9UGXLYFR5wMGNUH1qf6kt9lF6dUU9roVqnFo,9878
|
|
30
|
-
datacontract/export/bigquery_converter.py,sha256=
|
|
31
|
-
datacontract/export/csv_type_converter.py,sha256=ZZuJwBgQnafZC7PPvAXsBf2IajPJq8TYZ1l8Qq0GYeI,1290
|
|
30
|
+
datacontract/export/bigquery_converter.py,sha256=9mm-XP3klu1C5J87L9EL5ZyMCJhLBwsixo3aAw9QmRI,4738
|
|
32
31
|
datacontract/export/custom_converter.py,sha256=xb8KbkRRgHmT4ewwC7XxtnKpe_ZMSJWBjYOaKjmO_KQ,1216
|
|
33
32
|
datacontract/export/data_caterer_converter.py,sha256=eSEuy3TbqUIG_lHYEBOydAgp_CJNoGArXrcJvh81wcw,5984
|
|
34
33
|
datacontract/export/dbml_converter.py,sha256=f_OZEFwRUyL-Kg2yn_G58I8iz1VfFrZh8Nbw3Wq0JDo,4777
|
|
35
34
|
datacontract/export/dbt_converter.py,sha256=_CpRg3BD6UZvJJUMI4lzdiQj136rOjvXYVBMHvxEYqs,10548
|
|
36
35
|
datacontract/export/dcs_exporter.py,sha256=RALQ7bLAjak7EsoFFL2GFX2Oju7pnCDPCdRN_wo9wHM,210
|
|
36
|
+
datacontract/export/duckdb_type_converter.py,sha256=hUAAbImhJUMJOXEG-UoOKQqYGrJM6UILpn2YjUuAUOw,2216
|
|
37
37
|
datacontract/export/exporter.py,sha256=XrNmoIH_5Myb8jx-vaS1ZCF11RTw5zf5JATkqXWunXE,3025
|
|
38
38
|
datacontract/export/exporter_factory.py,sha256=0XmU51fQNZVQdC78gDy_82CatazhioMmcd6qdCl8muU,5847
|
|
39
39
|
datacontract/export/go_converter.py,sha256=Ttvbfu3YU-3GBwRD6nwCsFyZuc_hiIvJD-Jg2sT5WLw,3331
|
|
40
|
-
datacontract/export/great_expectations_converter.py,sha256=
|
|
40
|
+
datacontract/export/great_expectations_converter.py,sha256=WvEa4HNUMyzn2a5YNkcI9mjROzGkKRYOS2gFPjRRHNc,12218
|
|
41
41
|
datacontract/export/html_export.py,sha256=ojazWrb0AwSc7Vr72M_otMo-3PA8mfi8tfIy9BCXk9o,2578
|
|
42
42
|
datacontract/export/iceberg_converter.py,sha256=ArcQ_Y3z_W4_kGDU_8jPRx2-pHpP3Nhx1zYoETOL3c4,6804
|
|
43
43
|
datacontract/export/jsonschema_converter.py,sha256=2MT82MurcQQbrVDRj1kFsxnmFd9scNSfYI1upQSecl4,5631
|
|
44
44
|
datacontract/export/markdown_converter.py,sha256=chtaZX4vXTee7JCMYmWiDQ9m55gwJjHPw6SEM3UOwpQ,6467
|
|
45
|
-
datacontract/export/odcs_v3_exporter.py,sha256=
|
|
45
|
+
datacontract/export/odcs_v3_exporter.py,sha256=4iMPsREiVwODx29KETRUMcd1RRLRYLQy4mdwzsi0qbU,13128
|
|
46
46
|
datacontract/export/pandas_type_converter.py,sha256=464pQ3JQKFQa1TO0HBNcEoZvQye_yUbY6jQtiBaphSc,1117
|
|
47
|
-
datacontract/export/protobuf_converter.py,sha256=
|
|
47
|
+
datacontract/export/protobuf_converter.py,sha256=DHLl8BW26xqltBsd7Qhz0RhTl9YZQKCbkmjNpECgubg,7928
|
|
48
48
|
datacontract/export/pydantic_converter.py,sha256=1Lt9F8i6zyQYb44MyQtsXwCWWXYxZ47SmzArr_uPqsU,5579
|
|
49
49
|
datacontract/export/rdf_converter.py,sha256=4gnKus37Geth4MJ3Ruc8AbnpD_Ll9OCx8oTIEKScvh8,6435
|
|
50
50
|
datacontract/export/sodacl_converter.py,sha256=lQCOcNiT7i6KGaJ1Ua4MYBYGm-EyktTGrL4FLZDi14c,1102
|
|
51
|
-
datacontract/export/spark_converter.py,sha256
|
|
51
|
+
datacontract/export/spark_converter.py,sha256=LCue-rLan3ki7HgzUFyBaO8YUlc6CrDNBZD-QVgUv-U,7190
|
|
52
52
|
datacontract/export/sql_converter.py,sha256=BGjmOAlzB5QfzJiXP61ajV0wj4M5oJrmNZZe_4Lo1Ik,4821
|
|
53
53
|
datacontract/export/sql_type_converter.py,sha256=qjm8Fdyihq3VBL4x2D7RHdWoOm6HWIJe28U4XboYCk8,13436
|
|
54
54
|
datacontract/export/sqlalchemy_converter.py,sha256=0DMncvA811lTtd5q4ZORREQ9YH1vQm1lJeqMWsFvloE,6463
|
|
55
55
|
datacontract/export/terraform_converter.py,sha256=ExFoEvErVk-gBnWJiqC38SxDUmUEydpACWc917l5RyM,2163
|
|
56
|
-
datacontract/imports/avro_importer.py,sha256=
|
|
56
|
+
datacontract/imports/avro_importer.py,sha256=ryu4iUCSPJEV1uaE3AKdxD7fUxmRJ-ta936xurbgtHc,10922
|
|
57
57
|
datacontract/imports/bigquery_importer.py,sha256=7TcP9FDsIas5LwJZ-HrOPXZ-NuR056sxLfDDh3vjo8E,8419
|
|
58
|
-
datacontract/imports/csv_importer.py,sha256=
|
|
58
|
+
datacontract/imports/csv_importer.py,sha256=mBsmyTvfB8q64Z3NYqv4zTDUOvoXG896hZvp3oLt5YM,5330
|
|
59
59
|
datacontract/imports/dbml_importer.py,sha256=o0IOgvXN34lU1FICDHm_QUTv0DKsgwbHPHUDxQhIapE,3872
|
|
60
60
|
datacontract/imports/dbt_importer.py,sha256=hQwqD9vbvwLLc6Yj3tQbar5ldI0pV-ynSiz7CZZ0JCc,8290
|
|
61
|
+
datacontract/imports/excel_importer.py,sha256=gBKBKYImkv-bpmJu7JChnGqh8Yie3WIlxvjqgq8wNSc,36951
|
|
61
62
|
datacontract/imports/glue_importer.py,sha256=fiJPkvfwOCsaKKCGW19-JM5CCGXZ2mkNrVtUzp2iw6g,8370
|
|
62
63
|
datacontract/imports/iceberg_importer.py,sha256=vadGJVqQKgG-j8swUytZALFB8QjbGRqZPCcPcCy0vco,5923
|
|
63
|
-
datacontract/imports/importer.py,sha256=
|
|
64
|
-
datacontract/imports/importer_factory.py,sha256=
|
|
64
|
+
datacontract/imports/importer.py,sha256=u9HJHQ_PQKW9MoIsfRxzs-qQ33JZbeo2EjZiB71O63c,1006
|
|
65
|
+
datacontract/imports/importer_factory.py,sha256=VBSrr9e3g09eJwnkZveJXuUMrQr072AcTJZ0q1MVf18,3966
|
|
65
66
|
datacontract/imports/jsonschema_importer.py,sha256=67H__XLugV4vguHrIqzW02dtx27zYTWnOms4D1ma3bk,4961
|
|
66
67
|
datacontract/imports/odcs_importer.py,sha256=vv2dHLGL0Cdivv1CdKn5euJwGNKmiZmXCoxUYAXsHX8,2126
|
|
67
|
-
datacontract/imports/odcs_v3_importer.py,sha256=
|
|
68
|
+
datacontract/imports/odcs_v3_importer.py,sha256=sZVBENcPMl6rt0bbT_b1lnTFs3KOe1cZ2hwWaJBQhgY,16924
|
|
68
69
|
datacontract/imports/parquet_importer.py,sha256=W_0_16mX4stwDUt4GM2L7dnGmTpAySab5k13-OlTCCc,3095
|
|
70
|
+
datacontract/imports/protobuf_importer.py,sha256=rlUIskv9PNi5rFQ4Hobt9zlnKpahGsb4dy5G5UJoVAw,10840
|
|
69
71
|
datacontract/imports/spark_importer.py,sha256=h2na1YtdJYu9Oz07tSvwx8L4RX6aLCCDVkAv-RTKyVA,5100
|
|
70
72
|
datacontract/imports/sql_importer.py,sha256=ElFS2LILDOvWzW-X4emSIKltFV42i78TEoyg0bvn3II,9322
|
|
71
73
|
datacontract/imports/unity_importer.py,sha256=UcPYABhLZaWNl5IkCazwAuMoVDdujsu_QteuV_Q9hgI,6737
|
|
@@ -73,29 +75,29 @@ datacontract/init/init_template.py,sha256=BMawR-AF_vXyn_-Co-XoT8Dxj9b55V8xKk2KkJ
|
|
|
73
75
|
datacontract/integration/datamesh_manager.py,sha256=6_mHRQAqw-KCfVtejNxULN4ihBZTZikf_5p0pYHer7g,2849
|
|
74
76
|
datacontract/lint/files.py,sha256=tg0vq_w4LQsEr_8A5qr4hUJmHeGalUpsXJXC1t-OGC0,471
|
|
75
77
|
datacontract/lint/lint.py,sha256=Ew0n3ooXxmCVnUxJ_cDoacsD82QdMZYnKrxnG9J0sWQ,5077
|
|
76
|
-
datacontract/lint/resolve.py,sha256=
|
|
78
|
+
datacontract/lint/resolve.py,sha256=PTx3BxNlIMaaDPLo4A6kD0u3MpeFncLUoTYm_f9vkoM,12096
|
|
77
79
|
datacontract/lint/resources.py,sha256=nfeZmORh1aP7EKpMKCmfbS04Te8pQ0nz64vJVkHOq3c,647
|
|
78
80
|
datacontract/lint/schema.py,sha256=4pYX6JX6SkASftyqaWTodKFRVPi2qV0_Z60tvaCOk80,1813
|
|
79
81
|
datacontract/lint/urls.py,sha256=giac0eAYa6hha8exleL3KsiPtiFlOq8l53axtAmCilw,2529
|
|
80
82
|
datacontract/lint/linters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
81
|
-
datacontract/lint/linters/description_linter.py,sha256=
|
|
83
|
+
datacontract/lint/linters/description_linter.py,sha256=kQi38TKhqiEL3fwQDs6SdQQ9hXBHgfAi6Q6ZFNuLw1o,1505
|
|
82
84
|
datacontract/lint/linters/field_pattern_linter.py,sha256=lreGvOW3v_Glah_SriVe9ejZ7EuR6_gJsdr2tEORB_8,1084
|
|
83
|
-
datacontract/lint/linters/field_reference_linter.py,sha256=
|
|
84
|
-
datacontract/lint/linters/notice_period_linter.py,sha256=
|
|
85
|
-
datacontract/lint/linters/
|
|
86
|
-
datacontract/lint/linters/valid_constraints_linter.py,sha256=qTFh1X3I9wOtAxuXlvbGesCQ3GQ6iWc-MT_ttIybRsw,4916
|
|
87
|
-
datacontract/model/data_contract_specification.py,sha256=1bEE7hQJEjzoL4XtCQBmPe6VWclU_D_YiUJW2oNRNos,8655
|
|
85
|
+
datacontract/lint/linters/field_reference_linter.py,sha256=klLsQleJwW2qSJT0haS_V63oo7uYt2-SXbJh-rRkfVI,1989
|
|
86
|
+
datacontract/lint/linters/notice_period_linter.py,sha256=_0ZrwlHWA8my0IWAY3upQNKfeigj5N0ulT7Me9kd2PE,2124
|
|
87
|
+
datacontract/lint/linters/valid_constraints_linter.py,sha256=-IUyFFoEbnoNbjjJntlJv1POajh2mRU-4mJQVPL5r9s,4904
|
|
88
88
|
datacontract/model/exceptions.py,sha256=5BMuEH2qWuckNP4FTfpUEeEu6rjgGcLOD0GQugKRQ1U,1242
|
|
89
89
|
datacontract/model/odcs.py,sha256=9PXwm72FASjNwteF1Jn591iP3-St0aq16Cpsk0PkEW8,389
|
|
90
|
-
datacontract/model/run.py,sha256=
|
|
90
|
+
datacontract/model/run.py,sha256=4UdEUaJl5RxEpN9S3swSu1vGJUVyNhOpRkdfbBZhh90,3146
|
|
91
|
+
datacontract/model/data_contract_specification/__init__.py,sha256=lO7ywraknlDwJNUaSd2B9FWFsWhE8v5S-kob_shW_lg,47
|
|
92
|
+
datacontract/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
91
93
|
datacontract/output/junit_test_results.py,sha256=hAT7UgxwbfNzA0f5uuGzM4OIwLfXbmA4dgsfxsclWh0,4822
|
|
92
94
|
datacontract/output/output_format.py,sha256=_ZokDBo7-HXBs6czUv7kLLf9cYft_q5QaKzthsVnc58,212
|
|
93
95
|
datacontract/output/test_results_writer.py,sha256=PWNLs3R_LQMH4xp5WDxLkQgY3xvj8Eyzw1jnfgkQxlc,2713
|
|
94
96
|
datacontract/schemas/datacontract-1.1.0.init.yaml,sha256=_WQX6NRwimXlPVKcKeHLd4mFL0TJ2vYH0WnyMXZeQ8Y,1828
|
|
95
97
|
datacontract/schemas/datacontract-1.1.0.schema.json,sha256=3Bu2rxEjkF6dNLcqi1GF4KoXBnEIopaJ87Qb8S4zUvg,62872
|
|
96
98
|
datacontract/schemas/odcs-3.0.1.schema.json,sha256=bRZsSXA0fV0EmV_8f1K68PlXu1m4K7JcuHpLnY3ESwQ,72933
|
|
97
|
-
datacontract/templates/datacontract.html,sha256=
|
|
98
|
-
datacontract/templates/index.html,sha256=
|
|
99
|
+
datacontract/templates/datacontract.html,sha256=KxejmuQBnutQJY6rDiBtnWq3V0tdKPsCeyBomxazg5Q,15193
|
|
100
|
+
datacontract/templates/index.html,sha256=_e2J_NhOUPupDAQjBk8R68iCtrUa6lh6qVq6dYjm18s,12531
|
|
99
101
|
datacontract/templates/partials/datacontract_information.html,sha256=7ZBxgEgi2XndKBypeOpe03oCSRPOujC6NVlN7zexGNM,6221
|
|
100
102
|
datacontract/templates/partials/datacontract_servicelevels.html,sha256=ed3QgB11B0Qq2h_NwaroGZ4pQMBPEhfeQaoS-qEipqY,11401
|
|
101
103
|
datacontract/templates/partials/datacontract_terms.html,sha256=1cnJcOTpxwot2BCuZmkLF_SPfiVloLs3c8mj9WfE4sc,1865
|
|
@@ -105,9 +107,9 @@ datacontract/templates/partials/model_field.html,sha256=2YBF95ypNCPFYuYKoeilRnDG
|
|
|
105
107
|
datacontract/templates/partials/quality.html,sha256=ynEDWRn8I90Uje-xhGYgFcfwOgKI1R-CDki-EvTsauQ,1785
|
|
106
108
|
datacontract/templates/partials/server.html,sha256=WkWFbz1ZvhIAUQQhH5Lkwb0HZRW907ehEnFmJSkpquQ,6235
|
|
107
109
|
datacontract/templates/style/output.css,sha256=V1k6smSvlz07W2UNOkhcDFUb0HLmoas7DnNg_o8XUcA,25759
|
|
108
|
-
datacontract_cli-0.10.
|
|
109
|
-
datacontract_cli-0.10.
|
|
110
|
-
datacontract_cli-0.10.
|
|
111
|
-
datacontract_cli-0.10.
|
|
112
|
-
datacontract_cli-0.10.
|
|
113
|
-
datacontract_cli-0.10.
|
|
110
|
+
datacontract_cli-0.10.25.dist-info/licenses/LICENSE,sha256=23h64qnSeIZ0DKeziWAKC-zBCt328iSbRbWBrXoYRb4,2210
|
|
111
|
+
datacontract_cli-0.10.25.dist-info/METADATA,sha256=Kc_fZ_wuwVoDjKluxLUkH0-chM_b_lMcsCUnm9tNlyo,104455
|
|
112
|
+
datacontract_cli-0.10.25.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
|
113
|
+
datacontract_cli-0.10.25.dist-info/entry_points.txt,sha256=D3Eqy4q_Z6bHauGd4ppIyQglwbrm1AJnLau4Ppbw9Is,54
|
|
114
|
+
datacontract_cli-0.10.25.dist-info/top_level.txt,sha256=VIRjd8EIUrBYWjEXJJjtdUgc0UAJdPZjmLiOR8BRBYM,13
|
|
115
|
+
datacontract_cli-0.10.25.dist-info/RECORD,,
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# https://duckdb.org/docs/data/csv/overview.html
|
|
2
|
-
# ['SQLNULL', 'BOOLEAN', 'BIGINT', 'DOUBLE', 'TIME', 'DATE', 'TIMESTAMP', 'VARCHAR']
|
|
3
|
-
def convert_to_duckdb_csv_type(field) -> None | str:
|
|
4
|
-
type = field.type
|
|
5
|
-
if type is None:
|
|
6
|
-
return "VARCHAR"
|
|
7
|
-
if type.lower() in ["string", "varchar", "text"]:
|
|
8
|
-
return "VARCHAR"
|
|
9
|
-
if type.lower() in ["timestamp", "timestamp_tz"]:
|
|
10
|
-
return "TIMESTAMP"
|
|
11
|
-
if type.lower() in ["timestamp_ntz"]:
|
|
12
|
-
return "TIMESTAMP"
|
|
13
|
-
if type.lower() in ["date"]:
|
|
14
|
-
return "DATE"
|
|
15
|
-
if type.lower() in ["time"]:
|
|
16
|
-
return "TIME"
|
|
17
|
-
if type.lower() in ["number", "decimal", "numeric"]:
|
|
18
|
-
# precision and scale not supported by data contract
|
|
19
|
-
return "VARCHAR"
|
|
20
|
-
if type.lower() in ["float", "double"]:
|
|
21
|
-
return "DOUBLE"
|
|
22
|
-
if type.lower() in ["integer", "int", "long", "bigint"]:
|
|
23
|
-
return "BIGINT"
|
|
24
|
-
if type.lower() in ["boolean"]:
|
|
25
|
-
return "BOOLEAN"
|
|
26
|
-
if type.lower() in ["object", "record", "struct"]:
|
|
27
|
-
# not supported in CSV
|
|
28
|
-
return "VARCHAR"
|
|
29
|
-
if type.lower() in ["bytes"]:
|
|
30
|
-
# not supported in CSV
|
|
31
|
-
return "VARCHAR"
|
|
32
|
-
if type.lower() in ["array"]:
|
|
33
|
-
return "VARCHAR"
|
|
34
|
-
if type.lower() in ["null"]:
|
|
35
|
-
return "SQLNULL"
|
|
36
|
-
return "VARCHAR"
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import yaml
|
|
2
|
-
|
|
3
|
-
from datacontract.model.data_contract_specification import DataContractSpecification, Model
|
|
4
|
-
|
|
5
|
-
from ..lint import Linter, LinterResult
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class QualityUsesSchemaLinter(Linter):
|
|
9
|
-
@property
|
|
10
|
-
def name(self) -> str:
|
|
11
|
-
return "Quality check(s) use model"
|
|
12
|
-
|
|
13
|
-
@property
|
|
14
|
-
def id(self) -> str:
|
|
15
|
-
return "quality-schema"
|
|
16
|
-
|
|
17
|
-
def lint_sodacl(self, check, models: dict[str, Model]) -> LinterResult:
|
|
18
|
-
result = LinterResult()
|
|
19
|
-
for sodacl_check in check.keys():
|
|
20
|
-
table_name = sodacl_check[len("checks for ") :]
|
|
21
|
-
if table_name not in models:
|
|
22
|
-
result = result.with_error(f"Quality check on unknown model '{table_name}'")
|
|
23
|
-
return result
|
|
24
|
-
|
|
25
|
-
def lint_montecarlo(self, check, models: dict[str, Model]) -> LinterResult:
|
|
26
|
-
return LinterResult().with_warning("Linting montecarlo checks is not currently implemented")
|
|
27
|
-
|
|
28
|
-
def lint_great_expectations(self, check, models: dict[str, Model]) -> LinterResult:
|
|
29
|
-
return LinterResult().with_warning("Linting great expectations checks is not currently implemented")
|
|
30
|
-
|
|
31
|
-
def lint_implementation(self, contract: DataContractSpecification) -> LinterResult:
|
|
32
|
-
result = LinterResult()
|
|
33
|
-
models = contract.models
|
|
34
|
-
check = contract.quality
|
|
35
|
-
if not check:
|
|
36
|
-
return LinterResult()
|
|
37
|
-
if not check.specification:
|
|
38
|
-
return LinterResult.cautious("Quality check without specification.")
|
|
39
|
-
if isinstance(check.specification, str):
|
|
40
|
-
check_specification = yaml.safe_load(check.specification)
|
|
41
|
-
else:
|
|
42
|
-
check_specification = check.specification
|
|
43
|
-
match check.type:
|
|
44
|
-
case "SodaCL":
|
|
45
|
-
result = result.combine(self.lint_sodacl(check_specification, models))
|
|
46
|
-
case "montecarlo":
|
|
47
|
-
result = result.combine(self.lint_montecarlo(check_specification, models))
|
|
48
|
-
case "great-expectations":
|
|
49
|
-
result = result.combine(self.lint_great_expectations(check_specification, models))
|
|
50
|
-
case _:
|
|
51
|
-
result = result.with_warning("Can't lint quality check " f"with type '{check.type}'")
|
|
52
|
-
return result
|
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
from typing import Any, Dict, List
|
|
3
|
-
|
|
4
|
-
import pydantic as pyd
|
|
5
|
-
import yaml
|
|
6
|
-
|
|
7
|
-
DATACONTRACT_TYPES = [
|
|
8
|
-
"string",
|
|
9
|
-
"text",
|
|
10
|
-
"varchar",
|
|
11
|
-
"number",
|
|
12
|
-
"decimal",
|
|
13
|
-
"numeric",
|
|
14
|
-
"int",
|
|
15
|
-
"integer",
|
|
16
|
-
"long",
|
|
17
|
-
"bigint",
|
|
18
|
-
"float",
|
|
19
|
-
"double",
|
|
20
|
-
"boolean",
|
|
21
|
-
"timestamp",
|
|
22
|
-
"timestamp_tz",
|
|
23
|
-
"timestamp_ntz",
|
|
24
|
-
"date",
|
|
25
|
-
"array",
|
|
26
|
-
"bytes",
|
|
27
|
-
"object",
|
|
28
|
-
"record",
|
|
29
|
-
"struct",
|
|
30
|
-
"null",
|
|
31
|
-
]
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class Contact(pyd.BaseModel):
|
|
35
|
-
name: str | None = None
|
|
36
|
-
url: str | None = None
|
|
37
|
-
email: str | None = None
|
|
38
|
-
|
|
39
|
-
model_config = pyd.ConfigDict(
|
|
40
|
-
extra="allow",
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
class ServerRole(pyd.BaseModel):
|
|
45
|
-
name: str | None = None
|
|
46
|
-
description: str | None = None
|
|
47
|
-
model_config = pyd.ConfigDict(
|
|
48
|
-
extra="allow",
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
class Server(pyd.BaseModel):
|
|
53
|
-
type: str | None = None
|
|
54
|
-
description: str | None = None
|
|
55
|
-
environment: str | None = None
|
|
56
|
-
format: str | None = None
|
|
57
|
-
project: str | None = None
|
|
58
|
-
dataset: str | None = None
|
|
59
|
-
path: str | None = None
|
|
60
|
-
delimiter: str | None = None
|
|
61
|
-
endpointUrl: str | None = None
|
|
62
|
-
location: str | None = None
|
|
63
|
-
account: str | None = None
|
|
64
|
-
database: str | None = None
|
|
65
|
-
schema_: str | None = pyd.Field(default=None, alias="schema")
|
|
66
|
-
host: str | None = None
|
|
67
|
-
port: int | None = None
|
|
68
|
-
catalog: str | None = None
|
|
69
|
-
topic: str | None = None
|
|
70
|
-
http_path: str | None = None # Use ENV variable
|
|
71
|
-
token: str | None = None # Use ENV variable
|
|
72
|
-
dataProductId: str | None = None
|
|
73
|
-
outputPortId: str | None = None
|
|
74
|
-
driver: str | None = None
|
|
75
|
-
storageAccount: str | None = None
|
|
76
|
-
roles: List[ServerRole] = None
|
|
77
|
-
|
|
78
|
-
model_config = pyd.ConfigDict(
|
|
79
|
-
extra="allow",
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
class Terms(pyd.BaseModel):
|
|
84
|
-
usage: str | None = None
|
|
85
|
-
limitations: str | None = None
|
|
86
|
-
billing: str | None = None
|
|
87
|
-
noticePeriod: str | None = None
|
|
88
|
-
description: str | None = None
|
|
89
|
-
|
|
90
|
-
model_config = pyd.ConfigDict(
|
|
91
|
-
extra="allow",
|
|
92
|
-
)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
class Definition(pyd.BaseModel):
|
|
96
|
-
domain: str | None = None
|
|
97
|
-
name: str | None = None
|
|
98
|
-
title: str | None = None
|
|
99
|
-
description: str | None = None
|
|
100
|
-
type: str | None = None
|
|
101
|
-
enum: List[str] = []
|
|
102
|
-
format: str | None = None
|
|
103
|
-
minLength: int | None = None
|
|
104
|
-
maxLength: int | None = None
|
|
105
|
-
pattern: str | None = None
|
|
106
|
-
minimum: int | None = None
|
|
107
|
-
exclusiveMinimum: int | None = None
|
|
108
|
-
maximum: int | None = None
|
|
109
|
-
exclusiveMaximum: int | None = None
|
|
110
|
-
pii: bool | None = None
|
|
111
|
-
classification: str | None = None
|
|
112
|
-
fields: Dict[str, "Field"] = {}
|
|
113
|
-
items: "Field" = None
|
|
114
|
-
tags: List[str] = []
|
|
115
|
-
links: Dict[str, str] = {}
|
|
116
|
-
example: str | None = None
|
|
117
|
-
examples: List[Any] | None = None
|
|
118
|
-
|
|
119
|
-
model_config = pyd.ConfigDict(
|
|
120
|
-
extra="allow",
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
class Quality(pyd.BaseModel):
|
|
125
|
-
type: str | None = None
|
|
126
|
-
description: str | None = None
|
|
127
|
-
query: str | None = None
|
|
128
|
-
dialect: str | None = None
|
|
129
|
-
mustBe: int | None = None
|
|
130
|
-
mustNotBe: int | None = None
|
|
131
|
-
mustBeGreaterThan: int | None = None
|
|
132
|
-
mustBeGreaterThanOrEqualTo: int | None = None
|
|
133
|
-
mustBeLessThan: int | None = None
|
|
134
|
-
mustBeLessThanOrEqualTo: int | None = None
|
|
135
|
-
mustBeBetween: List[int] = None
|
|
136
|
-
mustNotBeBetween: List[int] = None
|
|
137
|
-
engine: str | None = None
|
|
138
|
-
implementation: str | Dict[str, Any] | None = None
|
|
139
|
-
|
|
140
|
-
model_config = pyd.ConfigDict(
|
|
141
|
-
extra="allow",
|
|
142
|
-
)
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
class Field(pyd.BaseModel):
|
|
146
|
-
ref: str = pyd.Field(default=None, alias="$ref")
|
|
147
|
-
title: str | None = None
|
|
148
|
-
type: str | None = None
|
|
149
|
-
format: str | None = None
|
|
150
|
-
required: bool | None = None
|
|
151
|
-
primary: bool = pyd.Field(
|
|
152
|
-
default=None,
|
|
153
|
-
deprecated="Removed in Data Contract Specification v1.1.0. Use primaryKey instead.",
|
|
154
|
-
)
|
|
155
|
-
primaryKey: bool | None = None
|
|
156
|
-
unique: bool | None = None
|
|
157
|
-
references: str | None = None
|
|
158
|
-
description: str | None = None
|
|
159
|
-
pii: bool | None = None
|
|
160
|
-
classification: str | None = None
|
|
161
|
-
pattern: str | None = None
|
|
162
|
-
minLength: int | None = None
|
|
163
|
-
maxLength: int | None = None
|
|
164
|
-
minimum: int | None = None
|
|
165
|
-
exclusiveMinimum: int | None = None
|
|
166
|
-
maximum: int | None = None
|
|
167
|
-
exclusiveMaximum: int | None = None
|
|
168
|
-
enum: List[str] | None = []
|
|
169
|
-
tags: List[str] | None = []
|
|
170
|
-
links: Dict[str, str] = {}
|
|
171
|
-
fields: Dict[str, "Field"] = {}
|
|
172
|
-
items: "Field" = None
|
|
173
|
-
keys: "Field" = None
|
|
174
|
-
values: "Field" = None
|
|
175
|
-
precision: int | None = None
|
|
176
|
-
scale: int | None = None
|
|
177
|
-
example: Any | None = pyd.Field(
|
|
178
|
-
default=None,
|
|
179
|
-
deprecated="Removed in Data Contract Specification v1.1.0. Use examples instead.",
|
|
180
|
-
)
|
|
181
|
-
examples: List[Any] | None = None
|
|
182
|
-
quality: List[Quality] | None = []
|
|
183
|
-
config: Dict[str, Any] | None = None
|
|
184
|
-
|
|
185
|
-
model_config = pyd.ConfigDict(
|
|
186
|
-
extra="allow",
|
|
187
|
-
)
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
class Model(pyd.BaseModel):
|
|
191
|
-
description: str | None = None
|
|
192
|
-
type: str | None = None
|
|
193
|
-
namespace: str | None = None
|
|
194
|
-
title: str | None = None
|
|
195
|
-
fields: Dict[str, Field] = {}
|
|
196
|
-
quality: List[Quality] | None = []
|
|
197
|
-
primaryKey: List[str] | None = []
|
|
198
|
-
examples: List[Any] | None = None
|
|
199
|
-
config: Dict[str, Any] = None
|
|
200
|
-
tags: List[str] | None = None
|
|
201
|
-
|
|
202
|
-
model_config = pyd.ConfigDict(
|
|
203
|
-
extra="allow",
|
|
204
|
-
)
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
class Info(pyd.BaseModel):
|
|
208
|
-
title: str | None = None
|
|
209
|
-
version: str | None = None
|
|
210
|
-
status: str | None = None
|
|
211
|
-
description: str | None = None
|
|
212
|
-
owner: str | None = None
|
|
213
|
-
contact: Contact | None = None
|
|
214
|
-
|
|
215
|
-
model_config = pyd.ConfigDict(
|
|
216
|
-
extra="allow",
|
|
217
|
-
)
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
class Example(pyd.BaseModel):
|
|
221
|
-
type: str | None = None
|
|
222
|
-
description: str | None = None
|
|
223
|
-
model: str | None = None
|
|
224
|
-
data: str | object = None
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
# Deprecated Quality class
|
|
228
|
-
class DeprecatedQuality(pyd.BaseModel):
|
|
229
|
-
type: str | None = None
|
|
230
|
-
specification: str | object = None
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
class Availability(pyd.BaseModel):
|
|
234
|
-
description: str | None = None
|
|
235
|
-
percentage: str | None = None
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
class Retention(pyd.BaseModel):
|
|
239
|
-
description: str | None = None
|
|
240
|
-
period: str | None = None
|
|
241
|
-
unlimited: bool | None = None
|
|
242
|
-
timestampField: str | None = None
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
class Latency(pyd.BaseModel):
|
|
246
|
-
description: str | None = None
|
|
247
|
-
threshold: str | None = None
|
|
248
|
-
sourceTimestampField: str | None = None
|
|
249
|
-
processedTimestampField: str | None = None
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
class Freshness(pyd.BaseModel):
|
|
253
|
-
description: str | None = None
|
|
254
|
-
threshold: str | None = None
|
|
255
|
-
timestampField: str | None = None
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
class Frequency(pyd.BaseModel):
|
|
259
|
-
description: str | None = None
|
|
260
|
-
type: str | None = None
|
|
261
|
-
interval: str | None = None
|
|
262
|
-
cron: str | None = None
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
class Support(pyd.BaseModel):
|
|
266
|
-
description: str | None = None
|
|
267
|
-
time: str | None = None
|
|
268
|
-
responseTime: str | None = None
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
class Backup(pyd.BaseModel):
|
|
272
|
-
description: str | None = None
|
|
273
|
-
interval: str | None = None
|
|
274
|
-
cron: str | None = None
|
|
275
|
-
recoveryTime: str | None = None
|
|
276
|
-
recoveryPoint: str | None = None
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
class ServiceLevel(pyd.BaseModel):
|
|
280
|
-
availability: Availability | None = None
|
|
281
|
-
retention: Retention | None = None
|
|
282
|
-
latency: Latency | None = None
|
|
283
|
-
freshness: Freshness | None = None
|
|
284
|
-
frequency: Frequency | None = None
|
|
285
|
-
support: Support | None = None
|
|
286
|
-
backup: Backup | None = None
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
class DataContractSpecification(pyd.BaseModel):
|
|
290
|
-
dataContractSpecification: str | None = None
|
|
291
|
-
id: str | None = None
|
|
292
|
-
info: Info | None = None
|
|
293
|
-
servers: Dict[str, Server] = {}
|
|
294
|
-
terms: Terms | None = None
|
|
295
|
-
models: Dict[str, Model] = {}
|
|
296
|
-
definitions: Dict[str, Definition] = {}
|
|
297
|
-
examples: List[Example] = pyd.Field(
|
|
298
|
-
default_factory=list,
|
|
299
|
-
deprecated="Removed in Data Contract Specification " "v1.1.0. Use models.examples instead.",
|
|
300
|
-
)
|
|
301
|
-
quality: DeprecatedQuality | None = pyd.Field(
|
|
302
|
-
default=None,
|
|
303
|
-
deprecated="Removed in Data Contract Specification v1.1.0. Use " "model-level and field-level quality instead.",
|
|
304
|
-
)
|
|
305
|
-
servicelevels: ServiceLevel | None = None
|
|
306
|
-
links: Dict[str, str] = {}
|
|
307
|
-
tags: List[str] = []
|
|
308
|
-
|
|
309
|
-
@classmethod
|
|
310
|
-
def from_file(cls, file):
|
|
311
|
-
if not os.path.exists(file):
|
|
312
|
-
raise FileNotFoundError(f"The file '{file}' does not exist.")
|
|
313
|
-
with open(file, "r") as file:
|
|
314
|
-
file_content = file.read()
|
|
315
|
-
return DataContractSpecification.from_string(file_content)
|
|
316
|
-
|
|
317
|
-
@classmethod
|
|
318
|
-
def from_string(cls, data_contract_str):
|
|
319
|
-
data = yaml.safe_load(data_contract_str)
|
|
320
|
-
return DataContractSpecification(**data)
|
|
321
|
-
|
|
322
|
-
def to_yaml(self):
|
|
323
|
-
return yaml.dump(
|
|
324
|
-
self.model_dump(exclude_defaults=True, exclude_none=True, by_alias=True),
|
|
325
|
-
sort_keys=False,
|
|
326
|
-
allow_unicode=True,
|
|
327
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|