Class LookupTransformation

The lookup transformation enriches the incoming data with data from the lookup source. Data from the lookup source is read into memory when the first record arrives. For each incoming row, the lookup tries to find a matching record in the loaded source data and uses this record to enrich the ingoing data.

Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
    public class LookupTransformation : LookupTransformation<ExpandoObject, ExpandoObject>, IDataFlowLogging, IDataFlowTransformation<ExpandoObject, ExpandoObject>, IDataFlowSource<ExpandoObject>, IDataFlowSource, IDataFlowDestination<ExpandoObject>, IDataFlowDestination, IDataFlowComponent, ILoggableTask
Examples
  public class Order
                       {    
                           public int OrderNumber { get; set; }
                           public int CustomerId { get; set; }
                           public string CustomerName { get; set; }
                       }
                       public class Customer
                       {
                           [RetrieveColumn(nameof(Order.CustomerId))]
                           public int Id { get; set; }
                           [MatchColumn(nameof(Order.CustomerName))]
                           public string Name { get; set; }
                       }
                       DbSource<Order> orderSource = new DbSource<Order>("OrderData");
                       CsvSource<Customer> lookupSource = new CsvSource<Customer>("CustomerData.csv");
                       var lookup = new LookupTransformation<Order, Customer>();
                       lookup.Source = lookupSource;
                       DbDestination<Order> dest = new DbDestination<Order>("OrderWithCustomerTable");
                       source.LinkTo(lookup).LinkTo(dest);

Constructors

LookupTransformation()

Declaration
    public LookupTransformation()

LookupTransformation(IDataFlowExecutableSource<ExpandoObject>)

Declaration
    public LookupTransformation(IDataFlowExecutableSource<ExpandoObject> source)
Parameters
TypeNameDescription
IDataFlowExecutableSource<ExpandoObject>source

LookupTransformation(IDataFlowExecutableSource<ExpandoObject>, Func<ExpandoObject, IEnumerable<ExpandoObject>, ExpandoObject>)

Declaration
    public LookupTransformation(IDataFlowExecutableSource<ExpandoObject> source, Func<ExpandoObject, IEnumerable<ExpandoObject>, ExpandoObject> retrievalFunc)
Parameters
TypeNameDescription
IDataFlowExecutableSource<ExpandoObject>source
Func<ExpandoObject, IEnumerable<ExpandoObject>, ExpandoObject>retrievalFunc

Implements