public static IFluentSequenceMutatorBuilder ReplaceEmptyStringWithNull(this IFluentSequenceMutatorBuilder builder, params string[] columns) { return(builder.AddMutator(new ReplaceEmptyStringWithNullMutator(builder.ProcessBuilder.Result.Context) { Columns = columns, })); }
public static IFluentSequenceMutatorBuilder RemoveAllRow(this IFluentSequenceMutatorBuilder builder) { return(builder.AddMutator(new RemoveRowMutator(builder.ProcessBuilder.Result.Context) { Name = nameof(RemoveAllRow), })); }
public static IFluentSequenceMutatorBuilder TrimString(this IFluentSequenceMutatorBuilder builder, params string[] columns) { return(builder.AddMutator(new TrimStringMutator(builder.ProcessBuilder.Result.Context) { Columns = columns, })); }
public static IFluentSequenceMutatorBuilder SortInMemory(this IFluentSequenceMutatorBuilder builder, string name, Func <IEnumerable <IRow>, IEnumerable <IRow> > sorter) { return(builder.AddMutator(new MemorySortMutator(builder.ProcessBuilder.Result.Context) { Name = name, Sorter = sorter, })); }
/// <summary> /// Create any number of new rows based on the input rows. /// <para>- memory footprint is high because all rows are collected before the delegate is called</para> /// <para>- if the rows can be exploded one-by-one without knowing the other rows, then using <see cref="ExplodeMutatorFluent.Explode(IFluentSequenceMutatorBuilder, ExplodeMutator)"/> is highly recommended.</para> /// </summary> public static IFluentSequenceMutatorBuilder ExplodeInMemory(this IFluentSequenceMutatorBuilder builder, string name, InMemoryExplodeDelegate action) { return(builder.AddMutator(new InMemoryExplodeMutator(builder.ProcessBuilder.Result.Context) { Name = name, Action = action, })); }
/// <summary> /// Keeps only the first row of each key, and discard all subsequent rows with existing keys. /// <para>- input can be unordered</para> /// <para>- if a more refined logic is required to decide which row should be kept of rows with same key then <see cref="ReduceGroupToSingleRowMutatorFluent.ReduceGroupToSingleRow(IFluentSequenceMutatorBuilder, ReduceGroupToSingleRowMutator)"/> or <see cref="SortedReduceGroupToSingleRowMutatorFluent.ReduceGroupToSingleRowOrdered(IFluentSequenceMutatorBuilder, SortedReduceGroupToSingleRowMutator)"/></para> can be used instead. /// <para>- all keys are stored in memory</para> /// </summary> public static IFluentSequenceMutatorBuilder RemoveDuplicateRows(this IFluentSequenceMutatorBuilder builder, string name, Func <IReadOnlyRow, string> keyGenerator) { return(builder.AddMutator(new RemoveDuplicateRowsMutator(builder.ProcessBuilder.Result.Context) { Name = name, KeyGenerator = keyGenerator, })); }
public static IFluentSequenceMutatorBuilder CustomCode(this IFluentSequenceMutatorBuilder builder, string name, CustomMutatorDelegate action) { return(builder.AddMutator(new CustomMutator(builder.ProcessBuilder.Result.Context) { Name = name, Action = action, })); }
public static IFluentSequenceMutatorBuilder AddKeyHash(this IFluentSequenceMutatorBuilder builder, string targetColumn, params string[] keyColumns) { return(builder.AddMutator(new AddKeyHashMutator(builder.ProcessBuilder.Result.Context) { TargetColumn = targetColumn, KeyColumns = keyColumns, })); }
public static IFluentSequenceMutatorBuilder AddKeyHash(this IFluentSequenceMutatorBuilder builder, string targetColumn, Func <HashAlgorithm> hashAlgorithmCreator) { return(builder.AddMutator(new AddKeyHashMutator(builder.ProcessBuilder.Result.Context) { TargetColumn = targetColumn, HashAlgorithmCreator = hashAlgorithmCreator, })); }
public static IFluentSequenceMutatorBuilder RemoveRow(this IFluentSequenceMutatorBuilder builder, string name, RowTestDelegate rowTestDelegate) { return(builder.AddMutator(new RemoveRowMutator(builder.ProcessBuilder.Result.Context) { Name = name, RowFilter = rowTestDelegate, })); }
public static IFluentSequenceMutatorBuilder CustomCode(this IFluentSequenceMutatorBuilder builder, string name, Action <IRow> action) { return(builder.AddMutator(new CustomMutator(builder.ProcessBuilder.Result.Context) { Name = name, Action = row => { action.Invoke(row); return true; } })); }
/// <summary> /// Copy columns to input rows from existing rows using key matching. If there are more than 1 matches for a row, then it will be duplicated for each subsequent match (like a traditional SQL join operation). /// - the existing rows are read from a single <see cref="RowLookup"/> /// </summary> public static IFluentSequenceMutatorBuilder Join(this IFluentSequenceMutatorBuilder builder, JoinMutator mutator) { return builder.AddMutator(mutator); }
/// <summary> /// Tests row keys and execute <see cref="NoMatchAction"/> or <see cref="MatchAction"/> based on the result of each row. /// - the existing rows are read from a single <see cref="RowLookup"/> /// - if MatchAction.CustomJob is not null and MatchActionContainsMatch is true then all rows of the lookup are kept in the memory, otherwise a <see cref="CountableOnlyRowLookup"/> is used. /// </summary> public static IFluentSequenceMutatorBuilder KeyTest(this IFluentSequenceMutatorBuilder builder, KeyTestMutator mutator) { return(builder.AddMutator(mutator)); }
/// <summary> /// Organize input rows into groups and activates a selector which must select zero or one row from the group to be kept. All other rows of the group are discared. /// <para>- input can be unordered</para> /// <para>- returns all selected rows at once when everything is processed. Memory footprint is high because all rows in all groups are collected before selection</para> /// <para>- if the input is ordered then <see cref="SortedReduceGroupToSingleRowMutatorFluent.ReduceGroupToSingleRowOrdered(IFluentSequenceMutatorBuilder, SortedReduceGroupToSingleRowMutator)"/> should be used for much lower memory footprint and stream-like behavior</para> /// </summary> public static IFluentSequenceMutatorBuilder ReduceGroupToSingleRow(this IFluentSequenceMutatorBuilder builder, ReduceGroupToSingleRowMutator mutator) { return(builder.AddMutator(mutator)); }
/// <summary> /// <para>- input must be ordered by group key</para> /// <para>- returns each aggregate right after a group is processed (stream-like behavior like most mutators)</para> /// <para>- if there is an ordering mismatch in the input then later appearances of a previously processed key will create new aggregated group(s)</para> /// <para>- memory footprint is very low because only rows of one group are collected before aggregation is executed on them</para> /// </summary> public static IFluentSequenceMutatorBuilder AggregateOrdered(this IFluentSequenceMutatorBuilder builder, SortedMemoryAggregationMutator mutator) { return(builder.AddMutator(mutator)); }
public static IFluentSequenceMutatorBuilder ReplaceEmptyStringWithNull(this IFluentSequenceMutatorBuilder builder, ReplaceEmptyStringWithNullMutator mutator) { return(builder.AddMutator(mutator)); }
public static IFluentSequenceMutatorBuilder ResolveHierarchy(this IFluentSequenceMutatorBuilder builder, ResolveHierarchyMutator mutator) { return(builder.AddMutator(mutator)); }
/// <summary> /// Copy columns to input rows from existing rows using a custom selector. /// - <see cref="ExpandFromLookupMutator.MatchSelector"/> can select 0 or 1 row from a single <see cref="RowLookup"/> for each row /// </summary> public static IFluentSequenceMutatorBuilder ExpandFromLookup(this IFluentSequenceMutatorBuilder builder, ExpandFromLookupMutator mutator) { return(builder.AddMutator(mutator)); }
public static IFluentSequenceMutatorBuilder TrimString(this IFluentSequenceMutatorBuilder builder, TrimStringMutator mutator) { return(builder.AddMutator(mutator)); }
public static IFluentSequenceMutatorBuilder MergeStringColumns(this IFluentSequenceMutatorBuilder builder, MergeStringColumnsMutator mutator) { return(builder.AddMutator(mutator)); }
public static IFluentSequenceMutatorBuilder DeSerializeFromXml <T>(this IFluentSequenceMutatorBuilder builder, DataContractXmlDeSerializerMutator <T> mutator) { return(builder.AddMutator(mutator)); }
public static IFluentSequenceMutatorBuilder ReplaceNullWithValue(this IFluentSequenceMutatorBuilder builder, ReplaceNullWithValueMutator mutator) { return(builder.AddMutator(mutator)); }
public static IFluentSequenceMutatorBuilder WriteRowToExcelFileCustom <TState>(this IFluentSequenceMutatorBuilder builder, EpPlusSingleExcelFileWriterMutator <TState> mutator) where TState : BaseExcelWriterState, new() { return(builder.AddMutator(mutator)); }
/// <summary> /// Create any number of new rows based on the input rows. /// <para>- memory footprint is high because all rows are collected before the delegate is called</para> /// <para>- if the rows can be exploded one-by-one without knowing the other rows, then using <see cref="ExplodeMutatorFluent.Explode(IFluentSequenceMutatorBuilder, ExplodeMutator)"/> is highly recommended.</para> /// </summary> public static IFluentSequenceMutatorBuilder ExplodeInMemory(this IFluentSequenceMutatorBuilder builder, InMemoryExplodeMutator mutator) { return(builder.AddMutator(mutator)); }
/// <summary> /// Runs a test against a value in a row and if the test returns FALSE then the corresponding value will be replaced with an <see cref="EtlRowError"/>. /// </summary> public static IFluentSequenceMutatorBuilder ValidateColumn(this IFluentSequenceMutatorBuilder builder, ColumnValidationMutator mutator) { return(builder.AddMutator(mutator)); }
/// <summary> /// Compare input rows against existing rows with matching keys and execute <see cref="CompareWithRowMutator.MatchAndEqualsAction"/> or <see cref="CompareWithRowMutator.MatchButDifferentAction"/> or <see cref="CompareWithRowMutator.NoMatchAction"/> based on the result of the comparison. /// - existing rows are looked up from a single <see cref="RowLookup"/> /// </summary> public static IFluentSequenceMutatorBuilder CompareWithRow(this IFluentSequenceMutatorBuilder builder, CompareWithRowMutator mutator) { return(builder.AddMutator(mutator)); }
public static IFluentSequenceMutatorBuilder ConvertValue(this IFluentSequenceMutatorBuilder builder, InPlaceConvertMutator mutator) { return(builder.AddMutator(mutator)); }
public static IFluentSequenceMutatorBuilder CustomCode(this IFluentSequenceMutatorBuilder builder, CustomMutator mutator) { return(builder.AddMutator(mutator)); }
public static IFluentSequenceMutatorBuilder Unpivot(this IFluentSequenceMutatorBuilder builder, UnpivotMutator mutator) { return(builder.AddMutator(mutator)); }
public static IFluentSequenceMutatorBuilder AddKeyHash(this IFluentSequenceMutatorBuilder builder, AddKeyHashMutator mutator) { return(builder.AddMutator(mutator)); }