feat(datasync): add pipeline configuration models
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
namespace JdeScoping.DataSync.Configuration;
|
||||
|
||||
public record PipelineConfig(
|
||||
SourceConfig Source,
|
||||
Dictionary<string, SyncModeConfig> SyncModes,
|
||||
List<TransformerConfig>? Transformers,
|
||||
DestinationConfig Destination,
|
||||
List<string>? PreScripts,
|
||||
List<string>? PostScripts);
|
||||
|
||||
public record SourceConfig(
|
||||
string Connection,
|
||||
string Query,
|
||||
Dictionary<string, ParameterConfig>? Parameters);
|
||||
|
||||
public record ParameterConfig(
|
||||
string Name,
|
||||
string? Format,
|
||||
string Source = "offset",
|
||||
string? Value = null);
|
||||
|
||||
public record SyncModeConfig(
|
||||
string? MinDtOffset,
|
||||
bool PrePurge = false,
|
||||
bool ReIndex = false,
|
||||
string? UpdateWhen = null,
|
||||
DestinationOverride? Destination = null);
|
||||
|
||||
public record DestinationOverride(
|
||||
string? Type,
|
||||
List<string>? MatchColumns,
|
||||
List<string>? ExcludeFromUpdate);
|
||||
|
||||
public record TransformerConfig(
|
||||
string Type,
|
||||
List<string>? Columns,
|
||||
Dictionary<string, string>? Mappings);
|
||||
|
||||
public record DestinationConfig(
|
||||
string Table,
|
||||
List<string>? MatchColumns,
|
||||
List<string>? ExcludeFromUpdate);
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace JdeScoping.DataSync.Configuration;
|
||||
|
||||
public record PipelinesRoot(
|
||||
PipelineSettings? Settings, // Optional - defaults applied if missing
|
||||
Dictionary<string, PipelineConfig> Pipelines)
|
||||
{
|
||||
public PipelineSettings EffectiveSettings => Settings ?? new PipelineSettings();
|
||||
}
|
||||
|
||||
public record PipelineSettings(
|
||||
string Timezone = "UTC");
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace JdeScoping.DataSync.Options;
|
||||
|
||||
public class PipelineOptions
|
||||
{
|
||||
public const string SectionName = "Pipelines";
|
||||
public string ConfigPath { get; set; } = "Pipelines/pipelines.json";
|
||||
}
|
||||
Reference in New Issue
Block a user