IEtlCustomUser.Transform

Fore Syntax

Transform(Inputs: IEtlPlainRecordSets; Outputs: IEtlPlainRecordSets);

Fore.NET Syntax

Transform(Inputs: Prognoz.Platform.Interop.Etl.IEtlPlainRecordSets;
         Outputs: Prognoz.Platform.Interop.Etl.IEtlPlainRecordSets);

Parameters

Inputs. Transformer inputs based on user algorithm.

Outputs. Transformer outputs based on user algorithm.

Description

The Transform method transforms data in user algorithm.

Comments

To read data in the XML format, use the IEtlCustomUser.Read method.

Fore Example

Add links to the Etl, Xml system assemblies.

Public Class CUserAlgSimple: Object, IEtlCustomUser
    
    Public Sub Transform(Input: IEtlPlainRecordSets; Output: IEtlPlainRecordSets);
    Var
        RecordSetIn, RecordSetOut: IEtlPlainRecordSet;
        i, j, k: Integer;
    Begin
        For i := 0 To input.Count - 1 Do
        RecordSetIn := Input.Item(i);
        RecordSetOut := Output.Item(i);
        For j := 0 To RecordSetIn.Count - 1 Do
            RecordSetOut.Add;
            For k := 0 To RecordSetIn.Item(j).Count - 1 Do
                RecordSetOut.Item(j).Value(k) := 1;
            End For;
        End For;
        End For;
    End Sub Transform;
    
    Public Sub Read(pNode: IXMLDOMElement);
    Begin
        Debug.WriteLine("Read from CUserAlgSimple");
        Debug.WriteLine(pNode.xml);
    End Sub Read;
    
End Class CUserAlgSimple;

The example is a macro containing implementation of:

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Etl;
Imports Prognoz.Platform.Interop.MsXml2;

Public Class CUserAlgSimple: Object, IEtlCustomUser
    
    Public Sub Transform(Input: IEtlPlainRecordSets; Output: IEtlPlainRecordSets);
    Var
        RecordSetIn, RecordSetOut: IEtlPlainRecordSet;
        i, j, k: Integer;
    Begin
        For i := 0 To input.Count - 1 Do
        RecordSetIn := Input.Item[i];
        RecordSetOut := Output.Item[i];
        For j := 0 To RecordSetIn.Count - 1 Do
            RecordSetOut.Add();
            For k := 0 To RecordSetIn.Item[j].Count - 1 Do
                RecordSetOut.Item[j].Value[k] := 1;
            End For;
        End For;
        End For;
    End Sub Transform;
    
    Public Sub Read(pNode: IXMLDOMElement);
    Begin
        System.Diagnostics.Debug.WriteLine("Read from CUserAlgSimple");
        System.Diagnostics.Debug.WriteLine(pNode.xml);
    End Sub Read;

End Class CUserAlgSimple;

See also:

IEtlCustomUser