mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-25 08:58:26 +00:00
fix(ingest/dbt): improve dbt-cloud error message (#14098)
This commit is contained in:
parent
f12f8e37d0
commit
9de61bd881
@ -230,9 +230,10 @@ class SourceReport(ExamplesReport):
|
||||
context: Optional[str] = None,
|
||||
title: Optional[LiteralString] = None,
|
||||
exc: Optional[BaseException] = None,
|
||||
log: bool = True,
|
||||
) -> None:
|
||||
self._structured_logs.report_log(
|
||||
StructuredLogLevel.WARN, message, title, context, exc, log=True
|
||||
StructuredLogLevel.WARN, message, title, context, exc, log=log
|
||||
)
|
||||
|
||||
def report_failure(
|
||||
|
||||
@ -26,6 +26,7 @@ from datahub.ingestion.source.dbt.dbt_common import (
|
||||
DBTCommonConfig,
|
||||
DBTNode,
|
||||
DBTSourceBase,
|
||||
DBTSourceReport,
|
||||
)
|
||||
from datahub.ingestion.source.dbt.dbt_tests import DBTTest, DBTTestResult
|
||||
|
||||
@ -266,6 +267,7 @@ query DatahubMetadataQuery_{type}($jobId: BigInt!, $runId: BigInt) {{
|
||||
@capability(SourceCapability.TEST_CONNECTION, "Enabled by default")
|
||||
class DBTCloudSource(DBTSourceBase, TestableSource):
|
||||
config: DBTCloudConfig
|
||||
report: DBTSourceReport # nothing cloud-specific in the report
|
||||
|
||||
@classmethod
|
||||
def create(cls, config_dict, ctx):
|
||||
@ -404,8 +406,11 @@ class DBTCloudSource(DBTSourceBase, TestableSource):
|
||||
if node["resourceType"] in {"model", "seed", "snapshot"}:
|
||||
status = node["status"]
|
||||
if status is None and materialization != "ephemeral":
|
||||
self.report.report_warning(
|
||||
key, "node is missing a status, schema metadata will be incomplete"
|
||||
self.report.warning(
|
||||
title="Schema information may be incomplete",
|
||||
message="Some nodes are missing the `status` field, which dbt uses to track the status of the node in the target database.",
|
||||
context=key,
|
||||
log=False,
|
||||
)
|
||||
|
||||
# The code fields are new in dbt 1.3, and replace the sql ones.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user