Skip to content

Commit 5df1686

Browse files
authored
refactor: update manifest wrapper to use model_dump and supported languages (#61)
1 parent 97f938d commit 5df1686

File tree

1 file changed

+5
-2
lines changed
  • src/datapilot/core/platforms/dbt/wrappers/manifest/v12

1 file changed

+5
-2
lines changed

src/datapilot/core/platforms/dbt/wrappers/manifest/v12/wrapper.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
from datapilot.core.platforms.dbt.schemas.manifest import AltimateSeedConfig
3333
from datapilot.core.platforms.dbt.schemas.manifest import AltimateSeedNode
3434
from datapilot.core.platforms.dbt.schemas.manifest import AltimateSourceConfig
35+
from datapilot.core.platforms.dbt.schemas.manifest import AltimateSupportedLanguage
3536
from datapilot.core.platforms.dbt.schemas.manifest import AltimateTestConfig
3637
from datapilot.core.platforms.dbt.schemas.manifest import AltimateTestMetadata
3738
from datapilot.core.platforms.dbt.wrappers.manifest.v12.schemas import TEST_TYPE_TO_NODE_MAP
@@ -87,7 +88,7 @@ def _get_node(self, node: ManifestNode) -> AltimateManifestNode:
8788
alias=node.alias,
8889
raw_code=raw_code,
8990
language=language,
90-
config=AltimateNodeConfig(**node.config.__dict__) if node.config else None,
91+
config=AltimateNodeConfig(**node.config.model_dump()) if node.config else None,
9192
checksum=AltimateFileHash(
9293
name=node.checksum.name if node.checksum else None,
9394
checksum=node.checksum.checksum if node.checksum else None,
@@ -182,7 +183,9 @@ def _get_macro(self, macro: MacroNode) -> AltimateManifestMacroNode:
182183
patch_path=macro.patch_path,
183184
arguments=[AltimateMacroArgument(**arg.model_dump()) for arg in macro.arguments] if macro.arguments else None,
184185
created_at=macro.created_at,
185-
supported_languages=macro.supported_languages,
186+
supported_languages=[AltimateSupportedLanguage(lang.value) for lang in macro.supported_languages]
187+
if macro.supported_languages
188+
else None,
186189
)
187190

188191
def _get_exposure(self, exposure: ExposureNode) -> AltimateManifestExposureNode:

0 commit comments

Comments
 (0)