Customer Portal

Problem in Implementing CompanyTransactionsTutorial example

Comments 3

  • Avatar
    admin
    0
    Comment actions Permalink
    Hi MGarg,

    Do you use unaltered version of graph from examples? If you changed it (seems to me there are different names of components), or build your own version, can you please send me your graph?

    Thank you
  • Avatar
    mgarg
    0
    Comment actions Permalink
    HI,
    Thanx for your response.

    This is my graph below:

    <?xml version="1.0" encoding="UTF-8"?>
    <Graph author="mgarg" created="Wed Feb 08 12:01:07 IST 2012" guiVersion="3.1.2" id="1328683151495" licenseCode="community" licenseType="Community" modified="Wed Feb 08 12:27:15 IST 2012" modifiedBy="mgarg" name="A01_SplittingTransactions" revision="1.2" showComponentDetails="true">
    <Global>
    <Metadata id="Metadata1">
    <Record fieldDelimiter="|" name="Amounts" recordDelimiter="\n" type="delimited">
    <Field name="AmountID" type="string"/>
    <Field name="Amount" type="string"/>
    </Record>
    </Metadata>
    <Metadata id="Metadata2">
    <Record fieldDelimiter="|" name="Customers" recordDelimiter="\n" type="delimited">
    <Field name="CustomerID" type="string"/>
    <Field name="CustomerState" type="string"/>
    <Field name="CustomerSurname" type="string"/>
    <Field name="CustomerFirstname" type="string"/>
    </Record>
    </Metadata>
    <Metadata id="Metadata3">
    <Record fieldDelimiter="|" name="Employees" recordDelimiter="\n" type="delimited">
    <Field name="EmployeeID" type="string"/>
    <Field name="EmployeeSurname" type="string"/>
    <Field name="EmployeeFirstname" type="string"/>
    </Record>
    </Metadata>
    <Metadata id="Metadata4">
    <Record fieldDelimiter="|" name="IDs" recordDelimiter="\n" type="delimited">
    <Field name="AmountID" type="string"/>
    <Field name="CustomerID" type="string"/>
    <Field name="EmployeeID" type="string"/>
    </Record>
    </Metadata>
    <Metadata id="Metadata0" previewAttachment="${DATAIN_DIR}/Transactions.dat" previewAttachmentCharset="ISO-8859-1">
    <Record fieldDelimiter=";" name="Transactions_dat" previewAttachment="${DATAIN_DIR}/Transactions.dat" previewAttachmentCharset="ISO-8859-1" recordDelimiter="\n" skipSourceRows="0" type="delimited">
    <Field name="AmountID" type="string"/>
    <Field name="Amount" type="string"/>
    <Field name="CustomerID" type="string"/>
    <Field name="CustomerState" type="string"/>
    <Field name="CustomerSurname" type="string"/>
    <Field name="CustomerFirstname" type="string"/>
    <Field name="EmployeeID" type="string"/>
    <Field name="EmployeeSurname" type="string"/>
    <Field eofAsDelimiter="false" name="EmployeeFirstname" type="string"/>
    </Record>
    </Metadata>
    <Property fileURL="workspace.prm" id="GraphParameter0"/>
    <Dictionary/>
    </Global>
    <Phase number="0">
    <Node enabled="enabled" fileURL="${DATAIN_DIR}/Transactions.dat" guiHeight="99" guiName="" guiWidth="128" guiX="9" guiY="130" id="DATA_READER0" type="DATA_READER"/>
    <Node enabled="enabled" fileURL="${DATATMP_DIR}/IDs.dat" guiHeight="84" guiName="UniversalDataWriter" guiWidth="186" guiX="718" guiY="32" id="DATA_WRITER0" type="DATA_WRITER"/>
    <Node enabled="enabled" fileURL="${DATATMP_DIR}/Amounts.dat" guiHeight="99" guiName="UniversalDataWriter" guiWidth="186" guiX="718" guiY="130" id="DATA_WRITER1" type="DATA_WRITER"/>
    <Node enabled="enabled" fileURL="${DATATMP_DIR}/Customers.dat" guiHeight="99" guiName="UniversalDataWriter" guiWidth="186" guiX="734" guiY="249" id="DATA_WRITER2" type="DATA_WRITER"/>
    <Node enabled="enabled" fileURL="${DATATMP_DIR}/Employees.dat" guiHeight="99" guiName="UniversalDataWriter" guiWidth="186" guiX="734" guiY="361" id="DATA_WRITER3" type="DATA_WRITER"/>
    <Node dedupKey="AmountID(a);CustomerID(a);EmployeeID(a)" enabled="enabled" guiHeight="69" guiName="Dedup" guiWidth="128" guiX="548" guiY="32" id="DEDUP0" type="DEDUP"/>
    <Node dedupKey="AmountID(a)" enabled="enabled" guiHeight="69" guiName="Dedup" guiWidth="128" guiX="559" guiY="130" id="DEDUP1" type="DEDUP"/>
    <Node dedupKey="CustomerID(a)" enabled="enabled" guiHeight="69" guiName="Dedup" guiWidth="128" guiX="568" guiY="249" id="DEDUP2" type="DEDUP"/>
    <Node dedupKey="EmployeeID(a)" enabled="enabled" guiHeight="69" guiName="Dedup" guiWidth="128" guiX="574" guiY="346" id="DEDUP3" type="DEDUP"/>
    <Node enabled="enabled" guiHeight="99" guiName="ExtSort" guiWidth="128" guiX="404" guiY="32" id="EXT_SORT0" sortKey="AmountID(a);CustomerID(a);EmployeeID(a)" type="EXT_SORT"/>
    <Node enabled="enabled" guiHeight="84" guiName="ExtSort" guiWidth="128" guiX="404" guiY="137" id="EXT_SORT1" sortKey="AmountID(a)" type="EXT_SORT"/>
    <Node enabled="enabled" guiHeight="84" guiName="ExtSort" guiWidth="128" guiX="404" guiY="243" id="EXT_SORT2" sortKey="CustomerID(a)" type="EXT_SORT"/>
    <Node enabled="enabled" guiHeight="84" guiName="ExtSort" guiWidth="128" guiX="404" guiY="346" id="EXT_SORT3" sortKey="EmployeeID(a)" type="EXT_SORT"/>
    <Node enabled="enabled" guiHeight="84" guiName="Reformat" guiWidth="128" guiX="236" guiY="130" id="REFORMAT0" type="REFORMAT">
    <attr name="transform"><![CDATA[//#CTL2

    // Transforms input record into output record.
    function integer transform() {
    $0.AmountID = $0.AmountID;
    $1.Amount = $0.Amount;
    $0.CustomerID = $0.CustomerID;
    $2.CustomerState = $0.CustomerState;
    $2.CustomerSurname = $0.CustomerSurname;
    $2.CustomerFirstname = $0.CustomerFirstname;
    $0.EmployeeID = $0.EmployeeID;
    $3.EmployeeSurname = $0.EmployeeSurname;
    $3.EmployeeFirstname = $0.EmployeeFirstname;
    $1.AmountID = $0.AmountID;
    $2.CustomerID = $0.CustomerID;
    $3.EmployeeID = $0.EmployeeID;

    return ALL;
    }

    // Called during component initialization.
    // function boolean init() {}

    // Called during each graph run before the transform is executed. May be used to allocate and initialize resources
    // required by the transform. All resources allocated within this method should be released
    // by the postExecute() method.
    // function void preExecute() {}

    // Called only if transform() throws an exception.
    // function integer transformOnError(string errorMessage, string stackTrace) {}

    // Called during each graph run after the entire transform was executed. Should be used to free any resources
    // allocated within the preExecute() method.
    // function void postExecute() {}

    // Called to return a user-defined error message when an error occurs.
    // function string getMessage() {}
    ]]></attr>
    </Node>
    <Edge fromNode="DATA_READER0:0" guiBendpoints="" guiRouter="Manhattan" id="Edge0" inPort="Port 0 (in)" metadata="Metadata0" outPort="Port 0 (output)" toNode="REFORMAT0:0"/>
    <Edge fromNode="DEDUP0:0" guiBendpoints="" guiRouter="Manhattan" id="Edge9" inPort="Port 0 (in)" metadata="Metadata4" outPort="Port 0 (unique)" toNode="DATA_WRITER0:0"/>
    <Edge fromNode="DEDUP1:0" guiBendpoints="" guiRouter="Manhattan" id="Edge10" inPort="Port 0 (in)" metadata="Metadata1" outPort="Port 0 (unique)" toNode="DATA_WRITER1:0"/>
    <Edge fromNode="DEDUP2:0" guiBendpoints="" guiRouter="Manhattan" id="Edge11" inPort="Port 0 (in)" metadata="Metadata2" outPort="Port 0 (unique)" toNode="DATA_WRITER2:0"/>
    <Edge fromNode="DEDUP3:0" guiBendpoints="" guiRouter="Manhattan" id="Edge12" inPort="Port 0 (in)" metadata="Metadata3" outPort="Port 0 (unique)" toNode="DATA_WRITER3:0"/>
    <Edge fromNode="EXT_SORT0:0" guiBendpoints="" guiRouter="Manhattan" id="Edge5" inPort="Port 0 (in)" metadata="Metadata4" outPort="Port 0 (out)" toNode="DEDUP0:0"/>
    <Edge fromNode="EXT_SORT1:0" guiBendpoints="" guiRouter="Manhattan" id="Edge6" inPort="Port 0 (in)" metadata="Metadata1" outPort="Port 0 (out)" toNode="DEDUP1:0"/>
    <Edge fromNode="EXT_SORT2:0" guiBendpoints="" guiRouter="Manhattan" id="Edge7" inPort="Port 0 (in)" metadata="Metadata2" outPort="Port 0 (out)" toNode="DEDUP2:0"/>
    <Edge fromNode="EXT_SORT3:0" guiBendpoints="" guiRouter="Manhattan" id="Edge8" inPort="Port 0 (in)" metadata="Metadata3" outPort="Port 0 (out)" toNode="DEDUP3:0"/>
    <Edge fromNode="REFORMAT0:0" guiBendpoints="" guiRouter="Manhattan" id="Edge1" inPort="Port 0 (in)" metadata="Metadata4" outPort="Port 0 (out)" toNode="EXT_SORT0:0"/>
    <Edge fromNode="REFORMAT0:1" guiBendpoints="" guiRouter="Manhattan" id="Edge2" inPort="Port 0 (in)" metadata="Metadata1" outPort="Port 1 (out)" toNode="EXT_SORT1:0"/>
    <Edge fromNode="REFORMAT0:2" guiBendpoints="" guiRouter="Manhattan" id="Edge3" inPort="Port 0 (in)" metadata="Metadata2" outPort="Port 2 (out)" toNode="EXT_SORT2:0"/>
    <Edge fromNode="REFORMAT0:3" guiBendpoints="" guiRouter="Manhattan" id="Edge4" inPort="Port 0 (in)" metadata="Metadata3" outPort="Port 3 (out)" toNode="EXT_SORT3:0"/>
    </Phase>
    </Graph>
  • Avatar
    admin
    0
    Comment actions Permalink
    Hi MGarg,

    graph you sent me, is not the one from which log was generated. Log contained in your first post contained names of components like "SPLITTING_DATA1", but the graph you send not. I guess you sent me original graph from our sources (and it works for me).

Please sign in to leave a comment.