Skip to content

Commit 9b220ed

Browse files
committed
Better verbosity
1 parent d259e91 commit 9b220ed

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

metadata-ingestion/src/datahub/ingestion/api/source_helpers.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import json
12
import logging
23
from datetime import datetime, timezone
34
from typing import (
@@ -80,12 +81,16 @@ def create_dataset_props_patch_builder(
8081

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

8587

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

9095

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

0 commit comments

Comments
 (0)