Customer Portal

Partition component Question

Comments 3

  • Avatar
    oldforum
    0
    Comment actions Permalink
    Hello Alan !

    Your set up of Partition component suggests three intervals - ie. three output edges should be connected:

    *first interval ...3>
    *second interval (3...5>
    *third interval (5...

    see following example:
    ******
    <Phase number="0">
    <Node id="INPUT1" type="DELIMITED_DATA_READER_NIO" DataPolicy="Strict" >
    <attr name="fileURL">data/employees.dat</attr>
    </Node>
    <Node id="PARTITION" type="org.jetel.component.Partition">
    <attr name="ranges">3;5</attr>
    <attr name="partitionKey">EmployeeID</attr>
    </Node>
    <Node id="TRASH1" type="TRASH" />
    <Node id="TRASH2" type="TRASH"/>
    <Node id="TRASH3" type="TRASH"/>
    <Edge id="INEDGE1" fromNode="INPUT1:0" toNode="PARTITION:0" metadata="InMetadata"/>
    <Edge id="INNEREDGE1" fromNode="PARTITION:0" toNode="TRASH1:0" metadata="InMetadata"/>
    <Edge id="INNEREDGE2" fromNode="PARTITION:1" toNode="TRASH2:0" metadata="InMetadata"/>
    <Edge id="INNEREDGE3" fromNode="PARTITION:2" toNode="TRASH3:0" metadata="InMetadata"/>
    </Phase>
    </Graph>
    ******

    David.
  • Avatar
    oldforum
    0
    Comment actions Permalink
    Hello Alan !

    This is very strange in deed ! If you see data coming out of trash, it means that PARTITION component sends them out.

    One thing I noticed - you are sharing the same DB connection among all DB_OUTPUT_TABLE. Try to use "threadSafeConnectio" option or simply create three DBConnections and allow each DB_OUTPUT_TABLE to use its own - simply copy&paste the one you have now and specify different name/id for each.

    Also send me the original graph tracking output (with logging configured to output even DEBUG ingo) to david.pavlis<at>centrum.cz

    David.
  • Avatar
    oldforum
    0
    Comment actions Permalink
    David,

    I understand what you are saying. I changed my graph as per your email:

    <?xml version="1.0" encoding="UTF-8"?>
    ...
    <Phase number="0">
    <Node id="INPUT1" type="DB_INPUT_TABLE" dbConnection="OracleSRC" url="/sql/products.sql"/>
    <Node id="PARTITION" type="org.jetel.component.Partition" partitionKey="TYPE" ranges="2;3"/>
    <Node id="OUTPUT1" type="DB_OUTPUT_TABLE" dbConnection="OracleTGT" dbTable="Sales" />
    <Node id="OUTPUT2" type="DB_OUTPUT_TABLE" dbConnection="OracleTGT" dbTable="Sales" />
    <Node id="OUTPUT3" type="DB_OUTPUT_TABLE" dbConnection="OracleTGT" dbTable="Sales" />
    <Edge id="INEDGE1" fromNode="INPUT1:0" toNode="PARTITION:0" metadata="..."/>
    <Edge id="INNEREDGE1" fromNode="PARTITION:0" toNode="OUTPUT1:0" metadata="..."/>
    <Edge id="INNEREDGE2" fromNode="PARTITION:1" toNode="OUTPUT2:0" metadata="..."/>
    <Edge id="INNEREDGE3" fromNode="PARTITION:2" toNode="OUTPUT3:0" metadata="..."/>
    </Phase>
    </Graph>

    ZERO ROWS are loaded to my target table and I got NO ERRORS...BUT...Using TRASH output as option (instead of database table) works very well.

    Does this mean that the PARTITION component is not able to work when connected to a DB_OUTPUT component?

    Thanks in advance for your advice.

    Alan.

Please sign in to leave a comment.