ValueById(Id: String): Variant;
Id - field identifier.
The ValueById property determines value of a flat record field, which identifier is passed by the Id parameter.
Sub UserSub(Input: IEtlPlainRecordSets; Output: IEtlPlainRecordSets);
Var
RecordSetIn, RecordSetOut: IEtlPlainRecordSet;
RecordIn, RecordOut: IEtlPlainRecord;
i: Integer;
Begin
RecordSetIn:=Input.Item(0);
RecordSetOut:=Output.Item(0);
For i := 0 To RecordSetIn.Count - 1 Do
RecordSetOut.Add;
RecordIn:=RecordSetIn.Item(i);
RecordOut:=RecordSetOut.Item(i);
RecordOut.ValueById("FIELD00"):=RecordIn.ValueById("FIELD02");
End For;
End Sub UserSub;
This example is a macro that is used to transform data in ETL task. After executing the ETL task, data consumer field with the Field00 identifier is put in correspondence with data source field with the Field02 identifier.
See also: