Skip to main content

Set up the PI replace utility

The Cognite PI replace utility is distributed with the Cognite PI extractor's Windows installer (.msi file). When you run the .msi file, a setup wizard guides you through the installation process.

Before you start

The PI replace utility has the same server requirements and access capabilities as the PI extractor:

  1. Check the server requirements for the PI extractor.

  2. Make sure the PI replace utility has the following access capabilities in a Cognite Data Fusion (CDF) project:

    • timeseries:read and timeseries:write

    • raw:read, raw:write, and raw:list for state store configured to use CDF RAW.

    • events:read and events:write for logging extractor incidents as events in CDF.

    Tip

    You can use OpenID Connect and your existing identity provider (IdP) framework to manage access to CDF data securely. Read more.

Run the PI replace utility

  1. Download and run the latest PI extractor .msi installer from Extract data in the CDF user interface. The PI replace.exe file is placed in the same installation directory as the PI extractor's .exe file.

    For example, if the installation directory is C:\Cognite, you'll find PiReplace.exe in C:\Cognite\PiExtractor\PiReplace.exe.

  2. Create a working directory.

    Note

    This shouldn't be the same as the installation directory.

  3. Create a config directory inside the working directory and create a configuration file according to the configuration settings. The file must be in YAML format.

  4. Run PiExtractor.exe replace from the working directory.

Tip

You can override the default configuration directory with the -f <config_file> command line option.

Run periodically using Windows Task Scheduler

The PI replace utility is often required to run periodically, for instance, daily. You can set up Windows Task Scheduler according to this procedure for scheduled runs.