Installing the extractor
Install the extractor in an installation directory where the executable file or Python program and dependencies are stored. The extractor can be instantiated in multiple deployments, for instance, one per source system. Each deployment requires a separate working directory to read configuration files, store state, and write logs.You need interactive sign-in permissions to run a task.
Run as a service
The Windows Task Scheduler is an alternative to native Windows services. In this example, we’ll use the Task Scheduler to run the OPC UA extractor executable file as a service.Before you start
1
Unzip the extractor
Unzip the extractor in an installation directory. For example:
C:\Cognite\opcua-extractor.2
Create a working directory
Create a working directory for the source system. For example:
AControlSystem.3
Configure the extractor
Open the config folder and configure
config.yml based on the example file found in the same folder.Create a task
1
Create a basic task
Open the Task Scheduler, select Create Basic Task > enter a name > select Next.
2
Configure the trigger
In Task Trigger, select When the computer starts.
3
Set the action
In Action, select Start a program.
4
Configure the program
In Start a Program, insert the full path to the .exe file in Program/script, and add the working directory in Start in. Enter any command line arguments in Add arguments. For example, for PI extractor version 1.
5
Open properties dialog
In Summary, select Open the Properties dialog for this task when I click Finish, and then select Finish. Note that you can also modify properties later from the main window.
6
Configure general settings
On the General tab, select Run whether user is logged on or not.
7
Configure task settings
On the Settings tab, clear Stop the task if it runs longer than and, optionally, select If the task fails, restart every:.
8
Save the task
Select OK and if prompted, enter the password for the user. Save the task. The task is now listed under Active tasks in the main window:
The status Ready indicates that a task is ready to start but not running.
Start a task
To start a task, right-click and select Run, or select Run from the Actions pane.Run batch extractors on a schedule
1
Access trigger properties
Under Action, select Properties > Triggers.
2
Configure the schedule
Select Edit trigger and configure the schedule settings.