Skip to main content
To configure the PI replace utility, you must create a configuration file. The file must be in YAML format. In addition to the sections listed below, you must include these PI extractor configuration sections:

Minimal YAML configuration file

The YAML settings below contain valid PI replace utility configurations, but not all configuration options are used. The values wrapped in ${} are replaced with environment variables with that name. For example, ${COGNITE_PROJECT} will be replaced with the value of the environment variable called COGNITE_PROJECT. The configuration file also contains the global parameter version, which holds the version of the configuration schema used in the configuration file. This document describes version 2 of the configuration schema.

Configure the PI replace utility

Replace

Status codes

By default, the PI replace utility ingests only good data points and silently skips bad and uncertain data points. Include the status-codes parameter in the replace section to control which data points from the PI source system are written to CDF. You can configure the PI replace utility to ingest good and uncertain data points, or all data points regardless of status, similar to the PI extractor’s status-codes configuration.
Requires PI extractor 4.21.0 or later.

Data quality

Include the data_quality section to compare the data points from PI with the data points in CDF to log and report any differences in the number of data points and the values of data points. If you’ve included the metrics section, the data quality metrics are sent to the configured Prometheus pushgateway. PI replace creates a CSV file with a summary by the end of the run.

Events

You can configure the Cognite PI extractor to create CDF events for data loss and reconnection incidents. These incidents may cause data points to be missing in CDF. Include the events section to fetch these events from CDF at startup and replace the data points for the time range when these events occurred.
If you configure this section, the PI replace utility ignores the start-time and end-time parameters in the replace section.

State store

Include the state-store and configure the save_progress_interval parameter in the replace section to store the PI replace progress. This is useful for long-running operations where a crash or restart may occur. PI replace will resume from where it stopped instead of starting again.
Last modified on June 22, 2026