Class ExtractionPipeline
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
CogniteConfigCDF configuration
pipeConfig
PipelineNotificationConfigPipeline notification configuration
destination
CogniteDestinationCDF 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
SimulatorConfigSimulator configuration
token
CancellationTokenCancellation token
Returns
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
Exceptiontoken
CancellationToken
Returns
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
ExtPipeRunStatusPipeline run status
message
stringMessage
token
CancellationTokenCancellation token
Returns
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
CancellationTokenCancellation token