Deployment API
The cognite_data_quality.deploy module provides a unified API for deploying data quality validation infrastructure to CDF. Function handler code is embedded in the package; no separate function/ directory or function_source_root is required.
Overview
deploy_validation_infrastructure()– Ensures Records and state containers (OrchestrationState, FunctionValidationState), deploys the monitoring data model and views, the unified validation function, instance and (optionally) time series workflows and triggers.deploy_validation_pipeline()– Runs the full validation pipeline for a view (historic partitions, sync trigger, monitor schedule). Call after infrastructure is deployed.deploy_incremental()– Deploys function and workflow for a single view config (alternative to full infrastructure deploy).- Component helpers:
deploy_functions(),deploy_instance_workflows(),deploy_timeseries_workflows(),deploy_data_models().
Main Functions
deploy_validation_infrastructure()
Unified deployment of all validation infrastructure (recommended). Uses settings_path and views_dir; function code is taken from the package.
from pathlib import Path
from cognite_data_quality import deploy_validation_infrastructure, load_cognite_client_from_toml
client = load_cognite_client_from_toml("config.toml")
settings_path = Path("config/environments/my_env/settings.yaml")
views_dir = Path("config/environments/my_env/views")
deploy_validation_infrastructure(
client=client,
settings_path=settings_path,
views_dir=views_dir,
function_secrets={"client-id": "...", "client-secret": "..."}, # optional but required for orchestrator triggers
force=False,
dry_run=False,
)
deploy_validation_pipeline()
Deploy and run the full validation pipeline for a view (historic data, sync trigger, monitor schedule):
from cognite_data_quality import deploy_validation_pipeline
result = deploy_validation_pipeline(
client,
settings_path="config/environments/my_env/settings.yaml",
view_external_id="MyView",
wait=True,
)
# result: orchestration_id, partitions_triggered, sync_trigger_external_id, monitor_schedule_name, distribution, ...
deploy_incremental()
Deploy function and workflow for a single view config (takes view config path and optional config_env):
from cognite_data_quality import deploy_incremental
deploy_incremental(
view_config_path="config/environments/my_env/views/my_view.yaml",
client=client,
force=False,
dry_run=False,
)
Component-Specific Functions
For fine-grained control, you can deploy individual components:
deploy_functions()
Deploy Cognite Functions:
from cognite_data_quality import deploy_functions, load_settings
settings = load_settings("config/environments/my_env/settings.yaml")
deploy_functions(
client=client,
settings=settings,
env_name="my_env",
force=False,
)
deploy_instance_workflows()
Deploy instance validation workflows:
from cognite_data_quality import deploy_instance_workflows, load_view_configs
view_configs = load_view_configs("config/environments/my_env/views")
deploy_instance_workflows(
client=client,
view_configs=view_configs,
settings=settings,
env_name="my_env",
skip_trigger=False,
)
deploy_timeseries_workflows()
Deploy time series validation workflows:
from cognite_data_quality import deploy_timeseries_workflows, load_timeseries_configs
ts_configs = load_timeseries_configs("config/environments/my_env/timeseries")
deploy_timeseries_workflows(
client=client,
ts_configs=ts_configs,
settings=settings,
env_name="my_env",
)
deploy_data_models()
Deploy data models (optional):
from cognite_data_quality import deploy_data_models, DataModelId
data_models = [
DataModelId(space="my_space", external_id="MyDataModel", version="v1"),
]
deploy_data_models(
client=client,
data_models=data_models,
source_dir="data_models",
)
Configuration Loaders
load_settings()
Load environment settings from YAML:
from cognite_data_quality import load_settings, DeploymentSettings
settings: DeploymentSettings = load_settings("config/environments/my_env/settings.yaml")
load_view_configs()
Load instance validation configurations:
from cognite_data_quality import load_view_configs
configs = load_view_configs("config/environments/my_env/views")
# Returns: dict[str, ViewConfig]
load_timeseries_configs()
Load time series validation configurations:
from cognite_data_quality import load_timeseries_configs
configs = load_timeseries_configs("config/environments/my_env/timeseries")
# Returns: dict[str, TimeSeriesConfig]
load_views_from_cdf()
Load views directly from CDF DMS:
from cognite_data_quality import load_views_from_cdf
views = load_views_from_cdf(
client=client,
space="my_space",
data_model_external_id="MyDataModel",
version="v1",
)
Data Classes
DeploymentSettings
Environment-specific deployment settings loaded from settings.yaml.
DataModelId
Identifier for a CDF data model:
from cognite_data_quality import DataModelId
dm_id = DataModelId(
space="my_space",
external_id="MyDataModel",
version="v1",
)
Module Reference
cognite_data_quality.deploy
DataProductRef
Bases: BaseModel
Reference to a CDF DataProduct + version that a view belongs to.
Used inside :attr:ViewConfig.dataproducts to declare which DataProducts
should include this view when config_source: "dataproduct" is active.
Attributes:
| Name | Type | Description |
|---|---|---|
external_id |
str
|
External ID of the DataProduct. |
version |
str
|
Semantic version string of the DataProduct version to publish.
Default: |
schema_space |
str | None
|
DMS space for the DataProduct's |
datamodel_external_id |
str | None
|
Deprecated — the DataProducts API no longer
uses a |
Source code in cognite_data_quality/deploy.py
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
|
Location settings for SHACL rule files. |
timeseries |
TimeSeriesSettings | None
|
Time series 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['yaml', 'dataproduct']
|
Where view configs are sourced from. |
Source code in cognite_data_quality/deploy.py
model_post_init(__context)
Ensure function settings are populated with defaults if not provided.
FunctionSettings
Bases: BaseModel
Cognite Function settings.
Attributes:
| Name | Type | Description |
|---|---|---|
external_id |
str
|
CDF external ID for the function. Default: |
name |
str
|
Display name shown in CDF Console. Default: |
description |
str
|
Short description stored on the function resource. |
runtime |
str
|
Python runtime version string (e.g. |
source_dir |
str
|
Local directory name used as the function root inside the zip archive. |
include_files |
list[str]
|
List of paths (relative to source_dir) to bundle. |
Source code in cognite_data_quality/deploy.py
RawTableConfig
Bases: BaseModel
Full configuration for one RAW table validation deployment.
Attributes:
| Name | Type | Description |
|---|---|---|
table |
RawTableRef
|
Reference to the CDF RAW database and table. |
shacl_rules |
ShaclRulesRef
|
SHACL rules file reference. |
validation |
ValidationSettings
|
Validation behaviour settings. |
records |
RecordsOverrides
|
Per-table Records API overrides. |
partition_count |
int
|
Number of partitions for historic cursor-based validation. Default: 5. |
Source code in cognite_data_quality/deploy.py
RawTableRef
Bases: BaseModel
Reference to a CDF RAW table.
Attributes:
| Name | Type | Description |
|---|---|---|
database |
str
|
CDF RAW database name. |
name |
str
|
CDF RAW table name within the database. |
Source code in cognite_data_quality/deploy.py
RecordsOverrides
Bases: BaseModel
Per-view overrides for Records API coordinates.
All fields are optional; unset fields inherit the global
:class:RecordsSettings values.
Attributes:
| Name | Type | Description |
|---|---|---|
rule_set_id |
str | None
|
Override the rule set ID written to each record. |
rule_set_version |
str | None
|
Override the rule set version written to each record. |
data_domain_external_id |
str | None
|
External ID of the data domain attached to each record. |
use_instance_space |
bool
|
If |
records_space |
str | None
|
Explicit destination space for records. Only used
when use_instance_space is |
Source code in cognite_data_quality/deploy.py
RecordsSettings
Bases: BaseModel
Default Records API coordinates used by all deployed workflows.
Attributes:
| Name | Type | Description |
|---|---|---|
space |
str
|
CDF DMS space that hosts the Records container.
Default: |
container |
str
|
External ID of the DMS container that stores validation
records. Default: |
stream_id |
str
|
External ID of the Records API stream for ingestion.
Default: |
Source code in cognite_data_quality/deploy.py
ScheduleConfig
Bases: BaseModel
Cron-based schedule for time series validation workflows.
Attributes:
| Name | Type | Description |
|---|---|---|
cron |
str
|
Cron expression controlling when the workflow runs.
Default: |
Source code in cognite_data_quality/deploy.py
ShaclRulesRef
Bases: BaseModel
Reference to SHACL rules -- either a local file or RuleSet API references.
Attributes:
| Name | Type | Description |
|---|---|---|
file |
str | None
|
Filename (relative to the SHACL source directory) of the
|
external_id |
str | None
|
CDF Files external ID under which the rules file is uploaded and later retrieved by the validation function. Required when using file-based rules. |
ruleset_references |
list[dict] | None
|
List of |
Source code in cognite_data_quality/deploy.py
ShaclRulesSettings
Bases: BaseModel
Location settings for SHACL .ttl rule files.
Attributes:
| Name | Type | Description |
|---|---|---|
source_dir |
str
|
Path (relative to |
mime_type |
str
|
MIME type used when uploading rule files to CDF Files.
Default: |
dataset_external_id |
str | None
|
External ID of the CDF dataset to associate
uploaded rule files with. |
Source code in cognite_data_quality/deploy.py
TimeSeriesSettings
TimeseriesConfig
Bases: BaseModel
Full configuration for one time series validation workflow.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Unique name for this configuration; used as the workflow external ID suffix and display name. |
description |
str | None
|
Optional human-readable description stored on the workflow resource. |
filter |
TimeseriesFilter | None
|
Server-side DMS filter for selecting time series instances. Mutually exclusive with instance_ids. |
instance_ids |
list[TimeseriesInstanceId] | None
|
Explicit list of time series instances to validate. Mutually exclusive with filter. |
shacl_rules |
ShaclRulesRef
|
SHACL rules file reference. |
datamodel |
ViewRef
|
Data model containing the time series view definition. |
validation |
ValidationSettings
|
Validation behaviour settings. |
records |
RecordsOverrides
|
Per-config Records API overrides. |
schedule |
ScheduleConfig
|
Cron schedule for the validation trigger. |
backfill |
dict | None
|
Optional backfill configuration dict with keys
|
Source code in cognite_data_quality/deploy.py
TimeseriesFilter
Bases: BaseModel
Server-side filter for selecting time series instances to validate.
Attributes:
| Name | Type | Description |
|---|---|---|
space |
str | None
|
Restrict to instances in this CDF space. |
external_id_prefix |
str | None
|
Restrict to instances whose external ID starts with this prefix. |
Source code in cognite_data_quality/deploy.py
TimeseriesInstanceId
Bases: BaseModel
Explicit instance reference for a single time series to validate.
Attributes:
| Name | Type | Description |
|---|---|---|
space |
str
|
CDF space containing the instance. |
external_id |
str
|
External ID of the time series instance. |
Source code in cognite_data_quality/deploy.py
TriggerSettings
Bases: BaseModel
Settings for data-change triggers on instance validation workflows.
Attributes:
| Name | Type | Description |
|---|---|---|
external_id_prefix |
str
|
Prefix used when constructing per-view trigger external IDs. |
batch_size |
int
|
Maximum number of instances per trigger payload. Default: 10. |
batch_timeout |
int
|
Seconds to wait before flushing a partial batch. Default: 60. |
Source code in cognite_data_quality/deploy.py
ValidationSettings
Bases: BaseModel
Per-view validation behaviour settings.
Attributes:
| Name | Type | Description |
|---|---|---|
auto_load_depth |
int
|
Number of levels of referenced instances to auto-load before validation (0-3). Higher values increase coverage but reduce speed. Default: 2. |
verbose |
bool
|
Enable verbose logging inside the validation function.
Default: |
Source code in cognite_data_quality/deploy.py
ViewConfig
Bases: BaseModel
Full configuration for one instance-validation view.
Attributes:
| Name | Type | Description |
|---|---|---|
view |
ViewRef
|
Reference to the CDF view whose instances are validated. |
instance_spaces |
list[str]
|
CDF spaces that contain the instances to validate. Accepts a single string (coerced to a list) or a list. |
shacl_rules |
ShaclRulesRef
|
SHACL rules file reference. |
validation |
ValidationSettings
|
Validation behaviour settings (depth, verbosity). |
records |
RecordsOverrides
|
Per-view Records API overrides. |
workflow_external_id |
str | None
|
Explicit CDF workflow external ID. If |
trigger_external_id |
str | None
|
Explicit trigger external ID. Auto-derived
when |
partition_count |
int
|
Number of partitions for batch historic validation. Default: 10. |
partition_field |
str
|
DMS property used to range-partition instances
(e.g. |
chunk_size |
int
|
Instances validated per function invocation. Default: 200. |
sync_batch_size |
int | None
|
Overrides :attr: |
use_sync_cursor_mode |
bool
|
Use cursor-based sync instead of passing
instances in the trigger payload. Requires
|
max_concurrent_executions |
int | None
|
Maximum simultaneous CDF workflow executions. Default: 10. |
Source code in cognite_data_quality/deploy.py
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 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 | |
coerce_to_list(v)
classmethod
Coerce a bare string to a single-element list.
Source code in cognite_data_quality/deploy.py
normalise_instance_space(data)
classmethod
Accept both instance_space (str) and instance_spaces (list) from YAML.
Source code in cognite_data_quality/deploy.py
ViewRef
Bases: BaseModel
Reference to a CDF Data Model view.
Attributes:
| Name | Type | Description |
|---|---|---|
space |
str
|
CDF space that contains the view. |
external_id |
str
|
External ID of the view. |
version |
str
|
Version string of the view. |
Source code in cognite_data_quality/deploy.py
WorkflowSettings
Bases: BaseModel
Top-level settings for a CDF Workflow resource.
Attributes:
| Name | Type | Description |
|---|---|---|
external_id_prefix |
str
|
Prefix used when constructing per-view workflow
external IDs (e.g. |
version |
str
|
Workflow version string. Default: |
task |
WorkflowTaskSettings
|
Per-task retry/timeout settings. |
Source code in cognite_data_quality/deploy.py
WorkflowTaskSettings
Bases: BaseModel
Retry and timeout settings applied to each CDF workflow task.
Attributes:
| Name | Type | Description |
|---|---|---|
retries |
int
|
Number of task-level retries (CDF API limit: 0-10). Default: 3. |
timeout |
int
|
Task timeout in seconds. Default: 600. |
on_failure |
str
|
Behaviour on unrecoverable failure — |
Source code in cognite_data_quality/deploy.py
deploy_data_models(*, client, space='dataQuality', containers=None, data_model_id='DataQualityMonitoring', data_model_version='1', dry_run=False)
Deploy data models with auto-generated views from containers.
Creates views from existing DMS containers, making container data accessible through the CDF Data Modeling UI.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
CogniteClient
|
CogniteClient instance |
required |
space
|
str
|
Space containing containers (default: "dataQuality") |
'dataQuality'
|
containers
|
list[str] | None
|
List of container IDs to create views for (default: ["OrchestrationState", "FunctionValidationState"]) |
None
|
data_model_id
|
str
|
External ID for the data model |
'DataQualityMonitoring'
|
data_model_version
|
str
|
Version string |
'1'
|
dry_run
|
bool
|
Preview without deploying |
False
|
Returns:
| Type | Description |
|---|---|
dict[str, object]
|
dict with deployment results (datamodel, views, status) |
Example
from cognite_data_quality import deploy_data_models from cognite.client import CogniteClient client = CogniteClient() result = deploy_data_models(client=client, dry_run=False) print(f"Created {len(result['views'])} views")
Source code in cognite_data_quality/deploy.py
1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 | |
deploy_functions(*, client, settings, force=False, dry_run=False, debug_save_zip=None, secrets=None)
Deploy the unified SHACL validation function using embedded code.
Uses content hashing to skip redeployment when the function code is unchanged (hash stored in function metadata).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
CogniteClient
|
Cognite client for CDF API access. |
required |
settings
|
DeploymentSettings
|
Deployment settings containing function external ID, runtime, and file list. |
required |
force
|
bool
|
Force redeployment even if the function code hash matches the currently deployed function. |
False
|
dry_run
|
bool
|
Preview changes without deploying. |
False
|
debug_save_zip
|
Path | str | None
|
Directory path to save the function zip archive
for inspection (e.g. |
None
|
secrets
|
dict[str, str] | None
|
Function secrets passed at creation time, e.g.
|
None
|
Returns:
| Type | Description |
|---|---|
dict[str, dict[str, str]]
|
dict with key |
dict[str, dict[str, str]]
|
containing |
dict[str, dict[str, str]]
|
(one of |
Source code in cognite_data_quality/deploy.py
deploy_incremental(*, view_config_path, config_env=None, force=False, dry_run=False, client=None)
Deploy function, workflow, and trigger for a single view config.
Loads deployment settings from the repository's scripts/ directory
via shared.load_settings and deploys the validation pipeline for
one view.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
view_config_path
|
Path | str
|
Path to the view YAML config file. |
required |
config_env
|
str | None
|
Environment name (e.g. |
None
|
force
|
bool
|
Force redeployment even if content hashes are unchanged. |
False
|
dry_run
|
bool
|
Preview without making any CDF API calls. |
False
|
client
|
CogniteClient | None
|
Cognite client. Created from environment variables if
|
None
|
Returns:
| Type | Description |
|---|---|
dict[str, object]
|
dict with keys |
Source code in cognite_data_quality/deploy.py
1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 | |
deploy_raw_table_shacl(*, client, settings, tables, shacl_dir, dry_run=False)
Deploy SHACL rules for RAW table validation.
For RAW tables, we only upload SHACL files - no workflows or triggers are created. RAW validation is triggered explicitly via function calls.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
CogniteClient
|
CogniteClient instance |
required |
settings
|
DeploymentSettings
|
Deployment settings with records configuration |
required |
tables
|
list[RawTableConfig]
|
List of RAW table configs |
required |
shacl_dir
|
Path
|
Directory containing SHACL rule files |
required |
dry_run
|
bool
|
Preview without uploading |
False
|
Returns:
| Type | Description |
|---|---|
list[dict[str, object]]
|
list of deployment results for each table |
Source code in cognite_data_quality/deploy.py
deploy_timeseries_workflows(*, client, settings, configs, shacl_dir, force=False, dry_run=False, config_filter=None, skip_unchanged=True)
Deploy scheduled workflows and triggers for time series validation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
CogniteClient
|
CogniteClient instance |
required |
settings
|
DeploymentSettings
|
Deployment settings |
required |
configs
|
list[TimeseriesConfig]
|
List of timeseries configurations |
required |
shacl_dir
|
Path
|
Directory containing SHACL rules files |
required |
force
|
bool
|
Force redeployment even if config unchanged |
False
|
dry_run
|
bool
|
Preview without making changes |
False
|
config_filter
|
list[str] | None
|
Optional list of config names to deploy (deploy all if None) |
None
|
skip_unchanged
|
bool
|
Skip deployment if hash matches deployed workflow (default: True) |
True
|
Returns:
| Type | Description |
|---|---|
list[dict[str, object]]
|
List of deployment results with status for each config |
Source code in cognite_data_quality/deploy.py
948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 | |
deploy_validation_infrastructure(*, client, settings_path, views_dir=None, filter_views_by_shacl_rules=False, timeseries_dir=None, shacl_rules_dir=None, function_external_id=None, function_secrets=None, force=False, force_function=False, force_workflows=False, dry_run=False, debug_save_zip=None, deploy_data_product_sync=False, data_product_sync_cron='0 * * * *')
Deploy functions, workflows, and triggers using embedded function code.
View configs are loaded from views/*.yaml files in the settings
directory. When settings.config_source is "dataproduct", the
SHACL .ttl files are published to the RuleSet API and view configs
are published to the DataProduct API instead of being uploaded as CDF
Files. When config_source is "yaml" (default), SHACL and view
configs are uploaded as CDF Files as usual.
When filter_views_by_shacl_rules is True, only views referenced
via sh:targetClass in their SHACL rules are deployed.
This function also ensures all required DMS containers exist in CDF before deploying.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
CogniteClient
|
Cognite client for CDF API access. |
required |
settings_path
|
Path | str
|
Path to the |
required |
views_dir
|
Path | str | None
|
Directory containing view YAML configs. Defaults to
|
None
|
filter_views_by_shacl_rules
|
bool
|
If |
False
|
timeseries_dir
|
Path | str | None
|
Directory containing time series validation YAML
configs. Defaults to |
None
|
shacl_rules_dir
|
Path | str | None
|
Directory containing SHACL |
None
|
function_external_id
|
str | None
|
Override for the deployed function external ID.
Defaults to |
None
|
function_secrets
|
dict[str, str] | None
|
Secrets to inject into the function at creation
time, e.g. |
None
|
force
|
bool
|
Force redeployment of both functions and workflows even when content hashes are unchanged. |
False
|
force_function
|
bool
|
Force redeployment of the function only; workflows are still skipped if their hashes are unchanged. |
False
|
force_workflows
|
bool
|
Force redeployment of workflows only; the function is still skipped if its hash is unchanged. |
False
|
dry_run
|
bool
|
Preview all changes without making any CDF API calls. |
False
|
debug_save_zip
|
Path | str | None
|
Directory path to save each function zip archive for
inspection (e.g. |
None
|
deploy_data_product_sync
|
bool
|
Deploy a scheduled workflow that discovers all DataProducts with quality rules and auto-deploys validation workflows for them. |
False
|
data_product_sync_cron
|
str
|
Cron expression for the data product
sync trigger. Default: |
'0 * * * *'
|
Returns:
| Type | Description |
|---|---|
dict[str, object]
|
dict with keys |
dict[str, object]
|
|
dict[str, object]
|
|
dict[str, object]
|
deployment result dicts with at minimum |
dict[str, object]
|
( |
Source code in cognite_data_quality/deploy.py
1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 | |
load_settings(path)
Load deployment settings from a YAML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path | str
|
Path to the |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Parsed |
DeploymentSettings
|
class: |
Source code in cognite_data_quality/deploy.py
load_table_configs(path)
Load RAW table validation configs from a directory.
Reads all *.yaml files in path and parses them as
:class:RawTableConfig objects. Returns an empty list if the
directory does not exist.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path | str
|
Directory containing RAW table YAML config files. |
required |
Returns:
| Type | Description |
|---|---|
list[RawTableConfig]
|
List of :class: |
list[RawTableConfig]
|
Empty list if path does not exist. |
Source code in cognite_data_quality/deploy.py
load_timeseries_configs(path)
Load time series validation configs from a directory.
Reads all *.yaml files in path and parses them as
:class:TimeseriesConfig objects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path | str
|
Directory containing time series YAML config files. |
required |
Returns:
| Type | Description |
|---|---|
list[TimeseriesConfig]
|
List of :class: |
Source code in cognite_data_quality/deploy.py
load_view_configs(path)
Load instance validation view configs from a directory.
Reads all *.yaml files in path and parses them as
:class:ViewConfig objects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path | str
|
Directory containing view YAML config files. |
required |
Returns:
| Type | Description |
|---|---|
list[ViewConfig]
|
List of :class: |