Skip to main content
To configure the PI AF extractor, you must edit the configuration file. The file is in YAML format, and the sample configuration file contains all valid options with default values. You can leave many fields empty to let the extractor use the default values. The configuration file separates the settings by component, and you can remove an entire component to disable it or use the default values.

Sample configuration files

In the extractor installation folder, the /config subfolder contains sample complete and minimal configuration files. 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 1 of the configuration schema. Not that it is not recommended to use the config.example.yml as a basis for configuration files. This file contains all configuration options, which is both hard to read, and may cause issues. It is intended as a reference showing how each option is configured, not as a basis. Use config.minimal.yml instead.
You must name the configuration file config.yml.
You can set up extraction pipelines to use versioned extractor configuration files stored in the cloud.

Before you start

  • Optionally, copy one of the sample files in the config directory and rename it to config.yml.
  • The config.minimal.yml file doesn’t include a metrics section. Copy this section from the example below if the extractor is required to send metrics to a Prometheus Pushgateway.
  • Set up an extraction pipeline and note the external ID.

Minimal YAML configuration file

showLineNumbers

Intervals

In most places where time intervals are required, you can use a CDF-like syntax of [N][timeunit], for example 10m for 10 minutes or 1h for 1 hour. timeunit is one of d, h, m, s, ms. You can also use a cron expression in some places.

Using values from Azure Key Vault

The PI AF extractor also supports loading values from Azure Key Vault. To load a configuration value from Azure Key Vault, use the !keyvault tag followed by the name of the secret you want to load. For example, to load the value of the my-secret-name secret in Key Vault into a password parameter, configure your extractor like this:
To use Key Vault, you also need to include the azure-keyvault section in your configuration, with the following parameters: Example:

Configure the PI AF extractor

PI AF Extractor configuration

pi

Global parameter. Include the pi section to configure the connection to the PI AF system. This is how the PI AF extractor selects a system:
  • If you configure system-name, the extractor selects the system by name from the preconfigured list of PI system on the machine the extractor runs on.
  • If you configure host, the extractor selects a PI system running on the PI server’s host.
  • If you don’t configure either of these parameters, the extractor selects the default system on the machine the extractor runs on. If there is no default system, the extractor selects the first system from the preconfigured PI system list on the machine the extractor runs on.

cognite

Global parameter. Configure connection to CDF.

idp-authentication

Part of cognite configuration. The idp-authentication section enables the extractor to authenticate to CDF using an external identity provider (IdP), such as Microsoft Entra ID (formerly Azure Active Directory). See OAuth 2.0 client credentials flow

certificate

Part of idp-authentication configuration. Authenticate with a client certificate

cdf-retries

Part of cognite configuration. Configure automatic retries on requests to CDF.

cdf-chunking

Part of cognite configuration. Configure chunking of data on requests to CDF. Note that increasing these may cause requests to fail due to limits in the API itself

cdf-throttling

Part of cognite configuration. Configure the maximum number of parallel requests for different CDF resources.

sdk-logging

Part of cognite configuration. Configure logging of requests from the SDK

extraction-pipeline

Part of cognite configuration. Configure an associated extraction pipeline

certificates

Part of cognite configuration. Configure special handling of SSL certificates. This should never be considered a permanent solution to certificate problems

allow-list

Part of certificates configuration. List of certificate thumbprints to automatically accept. This is a much smaller risk than accepting all certificates Each element of this list should be a string.

extraction

Global parameter. Include the extraction section to configure how to extract data from PI AF.

elements

Part of extraction configuration. Configuration for extraction PI AF Elements

destination

Global parameter. Include the destination section to configure the destination for the extracted data. Currently this is only the CDF staging area (RAW).

metrics

Global parameter. Configuration for publishing metrics.

server

Part of metrics configuration. Configuration for having the extractor start a Prometheus scrape server on a local port.

push-gateways

Part of metrics configuration. A list of pushgateway destinations to push metrics to. The extractor will automatically push metrics to each of these.

logger

Global parameter. Configuration for logging to console or file. Log entries are either Fatal, Error, Warning, Information, Debug, or Verbose, in order of decreasing priority. The extractor will log any messages at an equal or higher log level than the configured level for each sink.

console

Part of logger configuration. Configuration for logging to the console.

file

Part of logger configuration. Configuration for logging to a rotating log file.

trace-listener

Part of logger configuration. Adds a listener that uses the configured logger to output messages from System.Diagnostics.Trace
Last modified on December 9, 2025