Config
Configuration data classes exported from cognite_data_quality for validation and deployment:
DataModelConfig— identifies a CDF data model (space, external_id, version)RecordsConfig— configures Records API output (stream_id, rule_set_id, rule_set_version)DeploymentSettings— loaded fromsettings.yamlfor deployment
Pass DataModelConfig and RecordsConfig to run_validation(). DeploymentSettings is used by deploy_validation_infrastructure() and can also be loaded manually with load_settings().
See Config (TOML and view config) for credentials and view YAML. For how rules are stored, see Rule sources.
cognite_data_quality.DataModelConfig
Bases: BaseModel
Identifies a CDF Data Model used during instance validation.
Attributes:
| Name | Type | Description |
|---|---|---|
space |
str
|
CDF space that contains the data model. |
external_id |
str
|
External ID of the data model. |
version |
str
|
Version string of the data model. |
Source code in cognite_data_quality/_config.py
cognite_data_quality.RecordsConfig
Bases: BaseModel
Records API coordinates and rule set metadata for a validation run.
Attributes:
| Name | Type | Description |
|---|---|---|
stream_id |
str | None
|
External ID of the Records API stream to ingest into.
Set to |
rule_set_id |
str
|
Identifier for the SHACL rule set being applied (written to every record). |
rule_set_version |
str
|
Version string of the rule set (written to every record). |
data_domain_external_id |
str | None
|
Optional data domain tag written to each record for filtering in the validation dashboard. |
records_space |
str
|
CDF DMS space that hosts the validation records
container. Default: |
records_container |
str
|
External ID of the DMS container that stores
records. Default: |
use_instance_space |
bool
|
Write each record into the same space as the
validated instance instead of records_space. Default: |
record_space |
str | None
|
Explicit destination space, overriding records_space
when use_instance_space is |
Source code in cognite_data_quality/_records.py
cognite_data_quality.DeploymentSettings
Bases: BaseModel
Top-level deployment settings loaded from settings.yaml.
Attributes:
| Name | Type | Description |
|---|---|---|
function |
FunctionSettings | None
|
Cognite Function settings. Auto-populated with defaults if omitted from the YAML file. |
workflow |
WorkflowSettings
|
Workflow settings for instance validation workflows. |
timeseries_workflow |
WorkflowSettings | None
|
Separate workflow settings for time series
workflows. Falls back to workflow when |
trigger |
TriggerSettings
|
Data-change trigger settings for instance validation. |
records |
RecordsSettings
|
Default Records API coordinates (space, container, stream). |
shacl_rules |
ShaclRulesSettings | None
|
Location settings for SHACL rule files. |
timeseries |
TimeSeriesSettings | None
|
Time series config directory settings. |
rule_engine_result_sync |
RuleEngineResultSyncSettings | None
|
RuleEngineResult listener config directory
settings. |
partition_retries |
int
|
Maximum partition retry attempts managed by the orchestrator function (no CDF API limit). Default: 3. |
function_code_dataset_external_id |
str | None
|
Dataset for function code zip uploads. Required when CDF enforces dataset-scoped file access. |
config_source |
Literal['dataproduct']
|
Must be |
external_dataproducts |
list[ExternalDataProductRef]
|
Pre-existing DataProducts in CDF (created by others) to deploy validation workflows for. No local view configs or TTL files are needed — the deploy function fetches the DataProduct from CDF and deploys workflows directly. |
config_space |
str | None
|
DMS space for state and settings containers
( |
Source code in cognite_data_quality/deploy.py
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 | |
effective_config_space
property
Space for state/settings containers. Falls back to records.space if config_space is unset.
model_post_init(__context)
Ensure function settings are populated with defaults if not provided.