Skip to content

Migration notes — 0.4.4

Operator-impacting changes in cognite-data-quality 0.4.4. For earlier 0.4.x changes see Migration 0.4.1+ and Migration to 0.4.0.

Summary

Change Operator action
enqueue_historic_validation() public API Use after deploy_validation_infrastructure() when historic jobs must run but data_product_sync skipped deploy
deploy_validation_pipeline(historic_mode="enqueue") Prefer for CI: sequential queue instead of parallel orchestrator per view
Different return shapes Check mode — enqueue returns dict; orchestrator returns list
enqueue_historic_jobs batch retrieve warnings Inspect warnings in enqueue result; duplicates possible if DMS retrieve failed

Historic queue enqueue API

Problem: data_product_sync enqueues historic jobs only when it deploys workflows for a new DataProduct version. If workflows already carry [dp:{version}], sync skips without enqueueing — brownfield estates and CI deploys can miss historic runs.

Solution: Call enqueue_historic_validation() after infrastructure deploy:

from cognite_data_quality import enqueue_historic_validation

enqueue_historic_validation(
    client,
    data_quality_space="sp_data_quality",
    trigger_queue_manager=True,
)

Or via deploy_validation_pipeline(..., historic_mode="enqueue", trigger_queue_manager=True).

Jobs are processed sequentially by dq-historic-queue-manager. Enqueue is idempotent per view + DataProduct version (completed jobs skipped; active jobs superseded). Pass force=True on enqueue_historic_validation() to re-queue a completed run for the current version, including views with historic_reprocess_on_update: false. view_external_id only narrows scope. trigger_queue_manager=True starts processing; without it the job waits for the next cron.

Guides: Deploy, Invoke, Sync-cursor and historic.

Return shape by historic_mode

Mode Return type Key fields
orchestrator (default) list[dict] view, view_space, data_product, call_id, status
enqueue dict mode: "enqueue", status, data_products, total_enqueued, total_skipped, warnings, queue_manager_execution_id

Do not parse enqueue and orchestrator results with the same code path.

Typed results (0.4.4+): enqueue_historic_validation() returns EnqueueHistoricValidationResult (.to_dict() for JSON). enqueue_historic_jobs() returns EnqueueHistoricJobsResult. Orchestrator triggers use OrchestratorTriggerResult with mode: "orchestrator" per list item.

Upgrade checklist

  1. Bump package to cognite-data-quality==0.4.4 in function requirements and redeploy function (deploy_function.py --force or CI).
  2. After deploy_validation_infrastructure(), add enqueue_historic_validation(..., trigger_queue_manager=True) in CI if historic runs are required on every deploy.
  3. Update automation that assumed deploy_validation_pipeline() always returns a list.