Skip to content

Commit 6d2034f

Browse files
committed
remove semantic manifest
1 parent 9358e35 commit 6d2034f

File tree

12 files changed

+1
-212
lines changed

12 files changed

+1
-212
lines changed

src/datapilot/clients/altimate/constants.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66
"catalog",
77
"run_results",
88
"sources",
9-
"semantic_manifest",
109
}

src/datapilot/core/platforms/dbt/cli/cli.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from datapilot.core.platforms.dbt.utils import load_catalog
2020
from datapilot.core.platforms.dbt.utils import load_manifest
2121
from datapilot.core.platforms.dbt.utils import load_run_results
22-
from datapilot.core.platforms.dbt.utils import load_semantic_manifest
2322
from datapilot.core.platforms.dbt.utils import load_sources
2423
from datapilot.utils.formatting.utils import tabulate_data
2524
from datapilot.utils.utils import map_url_to_instance
@@ -160,7 +159,6 @@ def project_health(
160159
@click.option("--catalog-path", required=False, prompt=False, help="Path to the catalog file.")
161160
@click.option("--run-results-path", required=False, prompt=False, help="Path to the run_results.json file.")
162161
@click.option("--sources-path", required=False, prompt=False, help="Path to the sources.json file (source freshness results).")
163-
@click.option("--semantic-manifest-path", required=False, prompt=False, help="Path to the semantic_manifest.json file.")
164162
def onboard(
165163
token,
166164
instance_name,
@@ -172,7 +170,6 @@ def onboard(
172170
catalog_path,
173171
run_results_path,
174172
sources_path,
175-
semantic_manifest_path,
176173
):
177174
"""Onboard a manifest file to DBT. You can specify either --dbt_integration_id or --dbt_integration_name."""
178175

@@ -236,13 +233,6 @@ def onboard(
236233
click.echo(f"Error validating sources: {e}")
237234
return
238235

239-
if semantic_manifest_path:
240-
try:
241-
load_semantic_manifest(semantic_manifest_path)
242-
except Exception as e:
243-
click.echo(f"Error validating semantic_manifest: {e}")
244-
return
245-
246236
# Onboard manifest (required)
247237
response = onboard_file(token, instance_name, dbt_integration_id, dbt_integration_environment, "manifest", manifest_path, backend_url)
248238
if response["ok"]:
@@ -280,16 +270,6 @@ def onboard(
280270
else:
281271
click.echo(f"{response['message']}")
282272

283-
if semantic_manifest_path:
284-
response = onboard_file(
285-
token, instance_name, dbt_integration_id, dbt_integration_environment, "semantic_manifest", semantic_manifest_path, backend_url
286-
)
287-
if response["ok"]:
288-
click.echo("Semantic manifest onboarded successfully!")
289-
artifacts_uploaded.append("semantic_manifest")
290-
else:
291-
click.echo(f"{response['message']}")
292-
293273
# Start ingestion
294274
response = start_dbt_ingestion(token, instance_name, dbt_integration_id, dbt_integration_environment, backend_url)
295275
if response["ok"]:

src/datapilot/core/platforms/dbt/schemas/semantic_manifest.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/datapilot/core/platforms/dbt/utils.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from datapilot.core.platforms.dbt.schemas.manifest import AltimateManifestTestNode
2424
from datapilot.core.platforms.dbt.schemas.manifest import Manifest
2525
from datapilot.core.platforms.dbt.schemas.run_results import RunResults
26-
from datapilot.core.platforms.dbt.schemas.semantic_manifest import SemanticManifest
2726
from datapilot.core.platforms.dbt.schemas.sources import Sources
2827
from datapilot.exceptions.exceptions import AltimateFileNotFoundError
2928
from datapilot.exceptions.exceptions import AltimateInvalidJSONError
@@ -33,7 +32,6 @@
3332
from datapilot.utils.utils import load_json
3433
from vendor.dbt_artifacts_parser.parser import parse_manifest
3534
from vendor.dbt_artifacts_parser.parser import parse_run_results
36-
from vendor.dbt_artifacts_parser.parser import parse_semantic_manifest
3735
from vendor.dbt_artifacts_parser.parser import parse_sources
3836

3937
MODEL_TYPE_PATTERNS = {
@@ -132,22 +130,6 @@ def load_sources(sources_path: str) -> Sources:
132130
return sources
133131

134132

135-
def load_semantic_manifest(semantic_manifest_path: str) -> SemanticManifest:
136-
try:
137-
semantic_manifest_dict = load_json(semantic_manifest_path)
138-
except FileNotFoundError as e:
139-
raise AltimateFileNotFoundError(f"Semantic manifest file not found: {semantic_manifest_path}. Error: {e}") from e
140-
except ValueError as e:
141-
raise AltimateInvalidJSONError(f"Invalid JSON file: {semantic_manifest_path}. Error: {e}") from e
142-
143-
try:
144-
semantic_manifest: SemanticManifest = parse_semantic_manifest(semantic_manifest_dict)
145-
except ValueError as e:
146-
raise AltimateInvalidManifestError(f"Invalid semantic manifest file: {semantic_manifest_path}. Error: {e}") from e
147-
148-
return semantic_manifest
149-
150-
151133
# TODO: Add tests!
152134
def get_table_name_from_source(source: AltimateManifestSourceNode) -> str:
153135
db = source.database

src/vendor/dbt_artifacts_parser/parser.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
from vendor.dbt_artifacts_parser.parsers.run_results.run_results_v4 import RunResultsV4
3636
from vendor.dbt_artifacts_parser.parsers.run_results.run_results_v5 import RunResultsV5
3737
from vendor.dbt_artifacts_parser.parsers.run_results.run_results_v6 import RunResultsV6
38-
from vendor.dbt_artifacts_parser.parsers.semantic_manifest.semantic_manifest_v1 import SemanticManifestV1
3938
from vendor.dbt_artifacts_parser.parsers.sources.sources_v1 import SourcesV1
4039
from vendor.dbt_artifacts_parser.parsers.sources.sources_v2 import SourcesV2
4140
from vendor.dbt_artifacts_parser.parsers.sources.sources_v3 import SourcesV3
@@ -346,20 +345,3 @@ def parse_sources_v3(sources: dict) -> SourcesV3:
346345
if dbt_schema_version == ArtifactTypes.SOURCES_V3.value.dbt_schema_version:
347346
return SourcesV3(**sources)
348347
raise ValueError("Not a sources.json v3")
349-
350-
351-
#
352-
# semantic-manifest
353-
#
354-
def parse_semantic_manifest(semantic_manifest: dict) -> SemanticManifestV1:
355-
"""Parse semantic_manifest.json
356-
357-
Args:
358-
semantic_manifest: A dict of semantic_manifest.json
359-
360-
Returns:
361-
SemanticManifestV1
362-
"""
363-
# Semantic manifest uses a flexible schema, so we accept any valid dict
364-
# The schema version check is optional since the format may vary
365-
return SemanticManifestV1(**semantic_manifest)

src/vendor/dbt_artifacts_parser/parsers/semantic_manifest/__init__.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/vendor/dbt_artifacts_parser/parsers/semantic_manifest/semantic_manifest_v1.py

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/vendor/dbt_artifacts_parser/parsers/version_map.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
from vendor.dbt_artifacts_parser.parsers.run_results.run_results_v4 import RunResultsV4
3939
from vendor.dbt_artifacts_parser.parsers.run_results.run_results_v5 import RunResultsV5
4040
from vendor.dbt_artifacts_parser.parsers.run_results.run_results_v6 import RunResultsV6
41-
from vendor.dbt_artifacts_parser.parsers.semantic_manifest.semantic_manifest_v1 import SemanticManifestV1
4241
from vendor.dbt_artifacts_parser.parsers.sources.sources_v1 import SourcesV1
4342
from vendor.dbt_artifacts_parser.parsers.sources.sources_v2 import SourcesV2
4443
from vendor.dbt_artifacts_parser.parsers.sources.sources_v3 import SourcesV3
@@ -79,5 +78,3 @@ class ArtifactTypes(Enum):
7978
SOURCES_V1 = ArtifactType("https://schemas.getdbt.com/dbt/sources/v1.json", SourcesV1)
8079
SOURCES_V2 = ArtifactType("https://schemas.getdbt.com/dbt/sources/v2.json", SourcesV2)
8180
SOURCES_V3 = ArtifactType("https://schemas.getdbt.com/dbt/sources/v3.json", SourcesV3)
82-
# Semantic Manifest
83-
SEMANTIC_MANIFEST_V1 = ArtifactType("https://schemas.getdbt.com/dbt/semantic-manifest/v1.json", SemanticManifestV1)

tests/clients/altimate/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class TestOnboardFile:
66
def test_supported_artifact_types(self):
77
"""Test that all expected artifact types are supported."""
8-
expected_types = {"manifest", "catalog", "run_results", "sources", "semantic_manifest"}
8+
expected_types = {"manifest", "catalog", "run_results", "sources"}
99
assert SUPPORTED_ARTIFACT_TYPES == expected_types
1010

1111
def test_unsupported_file_type_returns_error(self):

tests/core/platform/dbt/test_artifact_loaders.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import pytest
22

33
from datapilot.core.platforms.dbt.utils import load_run_results
4-
from datapilot.core.platforms.dbt.utils import load_semantic_manifest
54
from datapilot.core.platforms.dbt.utils import load_sources
65
from datapilot.exceptions.exceptions import AltimateFileNotFoundError
76

@@ -35,19 +34,3 @@ def test_load_sources_v3(self):
3534
def test_load_sources_file_not_found(self):
3635
with pytest.raises(AltimateFileNotFoundError):
3736
load_sources("nonexistent_file.json")
38-
39-
40-
class TestLoadSemanticManifest:
41-
def test_load_semantic_manifest_v1(self):
42-
semantic_manifest_path = "tests/data/semantic_manifest_v1.json"
43-
semantic_manifest = load_semantic_manifest(semantic_manifest_path)
44-
45-
assert semantic_manifest is not None
46-
assert len(semantic_manifest.semantic_models) == 1
47-
assert semantic_manifest.semantic_models[0]["name"] == "orders"
48-
assert len(semantic_manifest.metrics) == 1
49-
assert semantic_manifest.metrics[0]["name"] == "revenue"
50-
51-
def test_load_semantic_manifest_file_not_found(self):
52-
with pytest.raises(AltimateFileNotFoundError):
53-
load_semantic_manifest("nonexistent_file.json")

0 commit comments

Comments
 (0)