Skip to content

Commit

Permalink
Better verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
skrydal committed Dec 9, 2024
1 parent d259e91 commit 9b220ed
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import json
import logging
from datetime import datetime, timezone
from typing import (
Expand Down Expand Up @@ -80,12 +81,16 @@ def create_dataset_props_patch_builder(

def check_mcp_correctness(mcp: MetadataChangeProposalClass):
logger.debug(f"Processing as MCP with urn: {mcp.entityUrn} and aspect: {mcp.aspectName}, change type: {mcp.changeType}")
logger.debug(f"{mcp.aspect}")
logger.debug(f"Aspect length: {len(mcp.aspect.value)}")
logger.debug(f"Full aspect:\n{mcp.aspect}")


def check_mcpw_correctness(mcp: MetadataChangeProposalWrapper):
logger.debug(f"Processing as MCP with urn: {mcp.entityUrn} and aspect: {mcp.aspectName}, change type: {mcp.changeType}")
logger.debug(f"{mcp.aspect}")
logger.debug(f"Full aspect:\n{mcp.aspect}")
if isinstance(mcp.aspect, SchemaMetadataClass):
schema: SchemaMetadataClass = mcp.aspect
logger.debug(f"Schema aspect dump:\n{json.dumps(schema, indent=4)}")


def check_workunit_correctness(stream: Iterable[MetadataWorkUnit]) -> Iterable[MetadataWorkUnit]:
Expand Down

0 comments on commit 9b220ed

Please sign in to comment.