Show / Hide Table of Contents

Class ExtractorRunnerParams<TConfig, TExtractor>

Parameters for launching an extractor. Can be modified after config is loaded by defining a ConfigCallback.

Inheritance
object
ExtractorRunnerParams<TConfig, TExtractor>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Cognite.Extractor.Utils
Assembly: ExtractorUtils.dll
Syntax
public class ExtractorRunnerParams<TConfig, TExtractor> where TConfig : VersionedConfig where TExtractor : BaseExtractor<TConfig>
Type Parameters
Name Description
TConfig

Type of config object

TExtractor

Type of extractor object

Properties

| Edit this page View Source

AcceptedConfigVersions

List of accepted config versions. Can be set to null to ignore.

Declaration
public int[]? AcceptedConfigVersions { get; set; }
Property Value
Type Description
int[]
| Edit this page View Source

AddLogger

True to add logging

Declaration
public bool AddLogger { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

AddMetrics

True to add metrics

Declaration
public bool AddMetrics { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

AddStateStore

True if the extractor uses a state store

Declaration
public bool AddStateStore { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

AllowRemoteConfig

Allow users to set type: remote and fetch config from extraction pipelines.

Declaration
public bool AllowRemoteConfig { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

AppId

AppId to use if CDF destination is defined

Declaration
public string? AppId { get; set; }
Property Value
Type Description
string
| Edit this page View Source

BufferRemoteConfig

True to buffer config if it is fetched from remote. Requires a config path to be set. Defaults to true.

Declaration
public bool BufferRemoteConfig { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

BuildLogger

Method to build logger from config. Defaults to GetConfiguredLogger(LoggerConfig)

Declaration
public Func<LoggerConfig, ILogger>? BuildLogger { get; set; }
Property Value
Type Description
Func<LoggerConfig, ILogger>
| Edit this page View Source

Config

Predefined config object, used instead of defining a config path.

Declaration
public TConfig? Config { get; set; }
Property Value
Type Description
TConfig
| Edit this page View Source

ConfigCallback

Called after config has been read. Can be used to modify the runner params and config object based on external parameters. New services can also be registered here based on the configuration object.

Declaration
public Action<TConfig, ExtractorRunnerParams<TConfig, TExtractor>, ServiceCollection>? ConfigCallback { get; set; }
Property Value
Type Description
Action<TConfig, ExtractorRunnerParams<TConfig, TExtractor>, ServiceCollection>
| Edit this page View Source

ConfigPath

Path to config file

Declaration
public string? ConfigPath { get; set; }
Property Value
Type Description
string
| Edit this page View Source

ConfigTypes

List of configuration types that should be registered if they are present on TConfig.

Declaration
public IEnumerable<Type>? ConfigTypes { get; set; }
Property Value
Type Description
IEnumerable<Type>
| Edit this page View Source

ExtServices

Predefined list of services.

Declaration
public ServiceCollection? ExtServices { get; set; }
Property Value
Type Description
ServiceCollection
| Edit this page View Source

IsFatalException

Let this method return true if the exception is fatal and the extractor should terminate.

Declaration
public Func<Exception, bool>? IsFatalException { get; set; }
Property Value
Type Description
Func<Exception, bool>
| Edit this page View Source

LogException

Method to log exceptions. Default is just a simple log message with the exception.

Declaration
public Action<ILogger, Exception, string>? LogException { get; set; }
Property Value
Type Description
Action<ILogger, Exception, string>
| Edit this page View Source

OnCreateExtractor

Called when the extractor has been built.

Declaration
public Action<CogniteDestination?, TExtractor>? OnCreateExtractor { get; set; }
Property Value
Type Description
Action<CogniteDestination, TExtractor>
| Edit this page View Source

RemoteConfig

Optional pre-existing remote config, used to inject the config object, for example from the command line.

Declaration
public RemoteConfig? RemoteConfig { get; set; }
Property Value
Type Description
RemoteConfig
| Edit this page View Source

RequireDestination

True to require a CogniteDestination to be set.

Declaration
public bool RequireDestination { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

Restart

True to restart if the extractor fails.

Declaration
public bool Restart { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

StartupLogger

Logger to use before config has been loaded.

Declaration
public ILogger? StartupLogger { get; set; }
Property Value
Type Description
ILogger
| Edit this page View Source

UserAgent

User agent to use if CDF destination is defined

Declaration
public string? UserAgent { get; set; }
Property Value
Type Description
string
| Edit this page View Source

WaitForConfig

Wait for config to be loaded, even if Restart is set to false.

Declaration
public bool WaitForConfig { get; set; }
Property Value
Type Description
bool

Extension Methods

DataModelUtils.GetOrCreateResourcesAsync<T, T2>(T2, IEnumerable<InstanceIdentifier>, Func<IEnumerable<InstanceIdentifier>, IEnumerable<SourcedNodeWrite<T>>>, Func<IEnumerable<SourcedNodeWrite<T>>, SanitationMode, (IEnumerable<SourcedNodeWrite<T>>, IEnumerable<CogniteError<SourcedNodeWrite<T>>>)>, int, int, RetryMode, SanitationMode, CancellationToken)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX