Hitachi Vantara Pentaho Community Forums
Results 1 to 11 of 11

Thread: Error Handling in Extraction

  1. #1

    Default Error Handling in Extraction

    Hi,

    in the extraction fase we get data from different tables in a database. I want to test the connection and test if the tables exists. If not, i want to sent a mail AND populate a log-table i created.

    It would be best if i can read a txt file, with all the extraction tables in it. Pass them through and test them 1 by 1. If 1 of them fails, a mail needs to be sent and the log_table has to added with the failure.

    in a job i can test if a table exists, but only 1. and there i cannot use the error handling i can use in transformations. Does anyone have an idea about this?


    thanks in advance,

    Rob Smienk

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    You can use "error handling" in jobs... green arrows all is ok, red arrows on error... and you can sequence multiple "table exists" job entries.

    Regards,
    Sven

  3. #3

    Default

    thank you Sven,

    i indeed use the green and red arrows. But i want to capture the error and put it in my own log_table.

    and can you please give me more information about what you mean by sequence multiple "table exists"? i don't think i get what you mean.

  4. #4
    Join Date
    May 2006
    Posts
    4,882

    Default

    You can execute multiple table exists after each other to check more than 1 table (hardcoding them) or you can use a job/subjob design and pass in the table names 1 by 1 using variables.

    For logging errors that's currently not possible ... in transformations it's possible because the rows are "diverted", in jobs it's mostly flow control that is happening. It would make sense that the table exists job entry would log the error but as before currently not in the log table you want it to be probably.

    Regards,
    Sven

  5. #5

    Default

    ok... i get the error handling..

    now about the job/subjob? How do i pass the tablenames between them? 1 by 1?

    i now select them from a txt input file. Those are sent back to the job(copy rows to result)... but then i have 6 or something rows. How do i put them into a variable? or in a subjob, 1 by 1?

  6. #6
    Join Date
    May 2006
    Posts
    4,882

    Default

    - A transformation A to read tablenames from somewhere and pass them to result (it's a step)
    - A transformation B reading a row from result and setting a variable with it (using set variable step)
    - Job C executing transformation B and then doing the table exists. C is run "for every input row".
    - Job D executing A and C in sequence.

    Regards,
    Sven

  7. #7

    Default

    again thank you Sven...

    did it the way you suggested... frustrating now, that i cannot get the variables out. In the log it says: table [] doesn't exists.... frustrating... is there a way that i can sent you my ktr and kjb files, so you can help me a bit quicker?

  8. #8
    Join Date
    May 2006
    Posts
    4,882

    Default

    attach them here (in a zip file e.g)... but make sure you remove all sensitive information. For the variables and table exists... I do think this is a 2.5.2/3.0 thing.

    Regards,
    Sven

  9. #9

    Default

    Hi,

    i've attached them. Hope you can make something out of it.

    gr,

    Rob
    Attached Files Attached Files

  10. #10

    Default

    Anyone an idea yet about this? What am i doing wrong?

  11. #11
    Join Date
    May 2006
    Posts
    4,882

    Default

    In set variable I would change the "${EMAXX_table}" to "EMAXX_table"

    For the rest I'll check later.

    Mvg,
    Sven

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.