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:
-
Check the server requirements for the PI extractor.
-
Make sure the PI replace utility has the following access capabilities in a Cognite Data Fusion (CDF) project:
-
timeseries:read
andtimeseries:write
-
raw:read
,raw:write
, andraw:list
for state store configured to use CDF RAW. -
events:read
andevents:write
for logging extractor incidents as events in CDF.
TipYou 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
-
Navigate to Data management > Integrate > Extractors and download and run the latest PI extractor .msi. PI Replace is a part of the PiExtractor.exe application, run with the replace subcommand.
For example, if the installation directory is
C:\Cognite\
, you can run Pi Replace asC:\Cognite\PiExtractor\PiExtractor.exe replace
. -
Create a working directory.
NoteThis shouldn't be the same as the installation directory.
-
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. -
Run
PiExtractor.exe replace
from the working directory.
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.