Table of Contents

Class ExtractionPipeline

Namespace
Cognite.Simulator.Utils
Assembly
Cognite.Simulator.Utils.dll

This class can be used to link the connector to a extraction pipeline in CDF

public class ExtractionPipeline
Inheritance
ExtractionPipeline
Inherited Members

Constructors

ExtractionPipeline(CogniteConfig, PipelineNotificationConfig, CogniteDestination, ILogger<ExtractionPipeline>)

Creates a new extraction pipeline object. It is not yet active, it needs to be initialized with Init(SimulatorConfig, CancellationToken) and then activated by running the PipelineUpdate(CancellationToken) task

public ExtractionPipeline(CogniteConfig cdfConfig, PipelineNotificationConfig pipeConfig, CogniteDestination destination, ILogger<ExtractionPipeline> logger)

Parameters

cdfConfig CogniteConfig

CDF configuration

pipeConfig PipelineNotificationConfig

Pipeline notification configuration

destination CogniteDestination

CDF client

logger ILogger<ExtractionPipeline>

Logger

Methods

Init(SimulatorConfig, CancellationToken)

Initialized the extraction pipeline, if configured. This method creates a new pipeline in CDF in case one does not exists. It uses the simulator name and dataset information specified in simConfig to create a new pipeline

public Task Init(SimulatorConfig simConfig, CancellationToken token)

Parameters

simConfig SimulatorConfig

Simulator configuration

token CancellationToken

Cancellation token

Returns

Task

NotifyError(Exception, CancellationToken)

Notify the extraction pipeline in case of errors only when the number of errors exceeds the configured limit within the configured time frame.

public Task NotifyError(Exception e, CancellationToken token)

Parameters

e Exception
token CancellationToken

Returns

Task

NotifyPipeline(ExtPipeRunStatus, string, CancellationToken)

Notify the pipeline with the given status change and message

public Task NotifyPipeline(ExtPipeRunStatus status, string message, CancellationToken token)

Parameters

status ExtPipeRunStatus

Pipeline run status

message string

Message

token CancellationToken

Cancellation token

Returns

Task

PipelineUpdate(CancellationToken)

Starts a notification loop that reports the connector status to the pipeline with the configured frequency

public Task PipelineUpdate(CancellationToken token)

Parameters

token CancellationToken

Cancellation token

Returns

Task