|
22 | 22 | from datahub.ingestion.source.state.stateful_ingestion_base import (
|
23 | 23 | StatefulIngestionConfigBase,
|
24 | 24 | )
|
| 25 | +from datahub.utilities.global_warning_util import add_global_warning |
25 | 26 | from datahub.utilities.lossy_collections import LossyList
|
26 | 27 | from datahub.utilities.perf_timer import PerfTimer
|
27 | 28 |
|
@@ -390,7 +391,8 @@ class PowerBiDashboardSourceConfig(
|
390 | 391 | # Enable/Disable extracting dataset schema
|
391 | 392 | extract_dataset_schema: bool = pydantic.Field(
|
392 | 393 | default=True,
|
393 |
| - description="Whether to ingest PBI Dataset Table columns and measures", |
| 394 | + description="Whether to ingest PBI Dataset Table columns and measures." |
| 395 | + " Note: this setting must be `true` for schema extraction and column lineage to be enabled.", |
394 | 396 | )
|
395 | 397 | # Enable/Disable extracting lineage information of PowerBI Dataset
|
396 | 398 | extract_lineage: bool = pydantic.Field(
|
@@ -526,6 +528,7 @@ def validate_extract_column_level_lineage(cls, values: Dict) -> Dict:
|
526 | 528 | "native_query_parsing",
|
527 | 529 | "enable_advance_lineage_sql_construct",
|
528 | 530 | "extract_lineage",
|
| 531 | + "extract_dataset_schema", |
529 | 532 | ]
|
530 | 533 |
|
531 | 534 | if (
|
@@ -591,3 +594,11 @@ def raise_error_for_dataset_type_mapping(cls, values: Dict) -> Dict:
|
591 | 594 | )
|
592 | 595 |
|
593 | 596 | return values
|
| 597 | + |
| 598 | + @root_validator(skip_on_failure=True) |
| 599 | + def validate_extract_dataset_schema(cls, values: Dict) -> Dict: |
| 600 | + if values.get("extract_dataset_schema") is False: |
| 601 | + add_global_warning( |
| 602 | + "Please use `extract_dataset_schema: true`, otherwise dataset schema extraction will be skipped." |
| 603 | + ) |
| 604 | + return values |
0 commit comments