Config
cognite_data_quality._config
CredentialsConfig
Bases: BaseModel
CDF credentials loaded from a TOML config file.
Attributes:
| Name | Type | Description |
|---|---|---|
project |
str
|
CDF project name. |
tenant_id |
str
|
Azure AD tenant ID. |
cdf_cluster |
str
|
CDF cluster (e.g. |
client_id |
str
|
Service principal client ID. |
client_secret |
str
|
Service principal client secret. |
login_flow |
str
|
Authentication flow. Default: |
Source code in cognite_data_quality/_config.py
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
RuleConfig
Bases: BaseModel
Resolved validation rule configuration passed to a validation handler.
Attributes:
| Name | Type | Description |
|---|---|---|
datamodel |
DataModelConfig | None
|
Target data model for instance loading. |
instance_space |
str | None
|
CDF space from which instances are read. |
auto_load_depth |
int
|
Levels of referenced instances to auto-load (0-3). Default: 2. |
verbose |
bool
|
Enable verbose logging in the handler. Default: |
records |
RecordsConfig | None
|
Records API configuration for result ingestion. |
Source code in cognite_data_quality/_config.py
ValidationInput
Bases: BaseModel
Input payload consumed by validation handler functions.
Attributes:
| Name | Type | Description |
|---|---|---|
instance_space |
str
|
CDF space from which instances are fetched and validated. |
shacl_rules |
str | None
|
Inline SHACL rules string (Turtle format). Mutually exclusive with shacl_rules_file_external_id and ruleset_references. |
shacl_rules_file_external_id |
str | None
|
CDF Files external ID of the SHACL rules file to load at runtime. Mutually exclusive with shacl_rules and ruleset_references. |
ruleset_references |
list[dict] | None
|
List of |
datamodel_space |
str | None
|
Space of the data model used for instance loading. |
datamodel_external_id |
str | None
|
External ID of the data model. |
datamodel_version |
str | None
|
Version of the data model. |
verbose |
bool
|
Enable verbose logging. Default: |
job_run_id |
str | None
|
Unique identifier for this validation run, written to
every record. Auto-generated if |
records_config |
RecordsConfig | None
|
Records API configuration. Pass |
Source code in cognite_data_quality/_config.py
ValidationResult
Bases: BaseModel
Aggregated result returned by a validation handler.
Attributes:
| Name | Type | Description |
|---|---|---|
conforms |
bool
|
|
violations |
list[Violation]
|
List of individual constraint violations. |
report_text |
str | None
|
Human-readable SHACL validation report text. |
instance_count |
int
|
Number of instances that were validated. |
records |
list[dict]
|
List of Records API payloads built from the violations. |
schema_issues |
list[dict]
|
List of schema inconsistency dicts detected in the data model (e.g. missing properties, type mismatches). |