Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Output not getting written

  1. #1
    Join Date
    Sep 2008
    Posts
    15

    Question Output not getting written

    Hi,

    I have been using Kettle for about 2 weeks now and like I said the last time, I really think it's a great tool, except that I keep running into these issues..

    I'm basically trying to use 'get rows from result' step to pass the table name from my previous transformation into this 'generic' log transformation which writes records to our table in Oracle db.

    I have used 'get rows from result' in another transformation and it works just fine, except in this log one I just cannot get it to write anything to the table. No errors as such, but a record does not get inserted!! Don't know what Im doing wrong...have tried quite a bit..and desperate now, please please help.

    Im attaching a subset of my final transformation here, just a simple one, so that u get an idea of what Im trying to do. Like in the example shown, I build the entire log row (with status, date from get system info step etc) as I go along and then insert the whole constructed row into the table..which is not getting inserted of course!

    Would greatly appreciate any help...thanks a lot in advance!

    -Sowj.
    Attached Files Attached Files

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

    Default

    Looks ok... check the options in the job where you execute the attached transformation (whether you don't do a clear of the results).

    Regards,
    Sven

  3. #3
    Join Date
    Sep 2008
    Posts
    15

    Default

    Thanks for the quick response Sven. Really appreciate it!

    I would like be able to run this transformation in itself first, so when I try to 'Run' it and enter the table name in the arguments value window and 'launch' it, it goes thru fine and does not insert a record in the log table.

    here's the log for ur reference -

    2008/11/02 15:01:24 - SharedObjects - Reading the shared objects file [file:///C:/Documents and Settings/Sowjanya/.kettle/shared.xml]
    2008/11/02 15:01:24 - org.pentaho.di.trans.TransMeta - We have 1 connections...
    2008/11/02 15:01:24 - org.pentaho.di.trans.TransMeta - Looking at connection #0
    2008/11/02 15:01:24 - org.pentaho.di.trans.TransMeta - Reading 3 steps...
    2008/11/02 15:01:24 - org.pentaho.di.trans.TransMeta - Looking at step #0
    2008/11/02 15:01:24 - StepMeta() - looking for the right step node (Table output)
    2008/11/02 15:01:24 - StepMeta() - specifics loaded for Table output
    2008/11/02 15:01:24 - StepMeta() - end of readXML()
    2008/11/02 15:01:24 - org.pentaho.di.trans.TransMeta - Looking at step #1
    2008/11/02 15:01:24 - StepMeta() - looking for the right step node (Get rows from result)
    2008/11/02 15:01:24 - StepMeta() - specifics loaded for Get rows from result
    2008/11/02 15:01:24 - StepMeta() - end of readXML()
    2008/11/02 15:01:24 - org.pentaho.di.trans.TransMeta - Looking at step #2
    2008/11/02 15:01:24 - StepMeta() - looking for the right step node (Add constants)
    2008/11/02 15:01:24 - StepMeta() - specifics loaded for Add constants
    2008/11/02 15:01:24 - StepMeta() - end of readXML()
    2008/11/02 15:01:24 - org.pentaho.di.trans.TransMeta - We have 2 hops...
    2008/11/02 15:01:24 - org.pentaho.di.trans.TransMeta - Looking at hop #0
    2008/11/02 15:01:24 - org.pentaho.di.trans.TransMeta - Looking at hop #1
    2008/11/02 15:01:24 - status1 - nr of steps read : 3
    2008/11/02 15:01:24 - status1 - nr of hops read : 2
    2008/11/02 15:01:24 - Spoon - Transformation opened.
    2008/11/02 15:01:24 - Spoon - Launching transformation [status1]...
    2008/11/02 15:01:24 - Spoon - Started the transformation execution.
    2008/11/02 15:01:24 - status1 - Dispatching started for transformation [status1]
    2008/11/02 15:01:24 - status1 - Nr of arguments detected:0
    2008/11/02 15:01:24 - status1 - This is not a replay transformation
    2008/11/02 15:01:24 - status1 - I found 3 different steps to launch.
    2008/11/02 15:01:24 - status1 - Allocating rowsets...
    2008/11/02 15:01:24 - status1 - Allocating rowsets for step 0 --> Get rows from result
    2008/11/02 15:01:24 - status1 - prevcopies = 1, nextcopies=1
    2008/11/02 15:01:24 - status1 - Transformation allocated new rowset [Get rows from result.0 - Add constants.0]
    2008/11/02 15:01:24 - status1 - Allocated 1 rowsets for step 0 --> Get rows from result
    2008/11/02 15:01:24 - status1 - Allocating rowsets for step 1 --> Add constants
    2008/11/02 15:01:24 - status1 - prevcopies = 1, nextcopies=1
    2008/11/02 15:01:24 - status1 - Transformation allocated new rowset [Add constants.0 - Table output.0]
    2008/11/02 15:01:24 - status1 - Allocated 2 rowsets for step 1 --> Add constants
    2008/11/02 15:01:24 - status1 - Allocating rowsets for step 2 --> Table output
    2008/11/02 15:01:24 - status1 - Allocated 2 rowsets for step 2 --> Table output
    2008/11/02 15:01:24 - status1 - Allocating Steps & StepData...
    2008/11/02 15:01:24 - status1 - Transformation is about to allocate step [Get rows from result] of type [RowsFromResult]
    2008/11/02 15:01:24 - status1 - Step has nrcopies=1
    2008/11/02 15:01:24 - Get rows from result.0 - distribution activated
    2008/11/02 15:01:24 - Get rows from result.0 - Starting allocation of buffers & new threads...
    2008/11/02 15:01:24 - Get rows from result.0 - Step info: nrinput=0 nroutput=1
    2008/11/02 15:01:24 - Get rows from result.0 - output rel. is 1:1
    2008/11/02 15:01:24 - Get rows from result.0 - Found output rowset [Get rows from result.0 - Add constants.0]
    2008/11/02 15:01:24 - Get rows from result.0 - Finished dispatching
    2008/11/02 15:01:24 - status1 - Transformation has allocated a new step: [Get rows from result].0
    2008/11/02 15:01:24 - status1 - Transformation is about to allocate step [Add constants] of type [Constant]
    2008/11/02 15:01:24 - status1 - Step has nrcopies=1
    2008/11/02 15:01:24 - Add constants.0 - distribution activated
    2008/11/02 15:01:24 - Add constants.0 - Starting allocation of buffers & new threads...
    2008/11/02 15:01:24 - Add constants.0 - Step info: nrinput=1 nroutput=1
    2008/11/02 15:01:24 - Add constants.0 - Got previous step from [Add constants] #0 --> Get rows from result
    2008/11/02 15:01:24 - Add constants.0 - input rel is 1:1
    2008/11/02 15:01:24 - Add constants.0 - Found input rowset [Get rows from result.0 - Add constants.0]
    2008/11/02 15:01:24 - Add constants.0 - output rel. is 1:1
    2008/11/02 15:01:24 - Add constants.0 - Found output rowset [Add constants.0 - Table output.0]
    2008/11/02 15:01:24 - Add constants.0 - Finished dispatching
    2008/11/02 15:01:24 - status1 - Transformation has allocated a new step: [Add constants].0
    2008/11/02 15:01:24 - status1 - Transformation is about to allocate step [Table output] of type [TableOutput]
    2008/11/02 15:01:24 - status1 - Step has nrcopies=1
    2008/11/02 15:01:24 - Table output.0 - distribution activated
    2008/11/02 15:01:24 - Table output.0 - Starting allocation of buffers & new threads...
    2008/11/02 15:01:24 - Table output.0 - Step info: nrinput=1 nroutput=0
    2008/11/02 15:01:24 - Table output.0 - Got previous step from [Table output] #0 --> Add constants
    2008/11/02 15:01:24 - Table output.0 - input rel is 1:1
    2008/11/02 15:01:24 - Table output.0 - Found input rowset [Add constants.0 - Table output.0]
    2008/11/02 15:01:24 - Table output.0 - Finished dispatching
    2008/11/02 15:01:24 - status1 - Transformation has allocated a new step: [Table output].0
    2008/11/02 15:01:24 - status1 - This transformation can be replayed with replay date: 2008/11/02 15:01:24
    2008/11/02 15:01:24 - status1 - Initialising 3 steps...
    2008/11/02 15:01:24 - Add constants.0 - Running on slave server #0/1.
    2008/11/02 15:01:24 - Table output.0 - Running on slave server #0/1.
    2008/11/02 15:01:24 - TMDWH - New database connection defined
    2008/11/02 15:01:24 - Get rows from result.0 - Running on slave server #0/1.
    2008/11/02 15:01:25 - TMDWH - Connected to database.
    2008/11/02 15:01:25 - Table output.0 - Connected to database [TMDWH] (commit=1)
    2008/11/02 15:01:25 - TMDWH - Auto commit off
    2008/11/02 15:01:25 - status1 - Step [Get rows from result.0] initialized flawlessly.
    2008/11/02 15:01:25 - status1 - Step [Add constants.0] initialized flawlessly.
    2008/11/02 15:01:25 - status1 - Step [Table output.0] initialized flawlessly.
    2008/11/02 15:01:25 - Get rows from result.0 - Starting to run...
    2008/11/02 15:01:25 - Add constants.0 - Starting to run...
    2008/11/02 15:01:25 - status1 - Transformation has allocated 3 threads and 2 rowsets.
    2008/11/02 15:01:25 - Table output.0 - Starting to run...
    2008/11/02 15:01:25 - Get rows from result.0 - Signaling 'output done' to 1 output rowsets.
    2008/11/02 15:01:25 - Get rows from result.0 - Finished processing (I=0, O=0, R=0, W=0, U=0, E=0)
    2008/11/02 15:01:25 - Add constants.0 - Signaling 'output done' to 1 output rowsets.
    2008/11/02 15:01:25 - Add constants.0 - Finished processing (I=0, O=0, R=0, W=0, U=0, E=0)
    2008/11/02 15:01:25 - Table output.0 - Signaling 'output done' to 0 output rowsets.
    2008/11/02 15:01:25 - TMDWH - Commit on database connection [TMDWH]
    2008/11/02 15:01:27 - TMDWH - Connection to database closed!
    2008/11/02 15:01:27 - Table output.0 - Finished processing (I=0, O=0, R=0, W=0, U=0, E=0)
    2008/11/02 15:01:27 - Spoon - The transformation has finished!!

    Why isn't a record being inserted? Any suggestions?

    Thanks a lot,
    Sowj.

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

    Default

    Why do you think you can run it on its own?

    From this "Get rows from result.0 - Finished processing (I=0, O=0, R=0, W=0, U=0, E=0)" you can see that the get result step didn't return any rows... so no rows will be inserted as there are no rows to insert.

    If you use get rows from result you need another transformation to put the rows in the result. Add constants will only add a constant to rows it sees on its input.. if there are no rows no action will happen

    Regards,
    Sven
    Last edited by sboden; 11-02-2008 at 06:47 PM.

  5. #5
    Join Date
    Sep 2008
    Posts
    15

    Thumbs up

    Thanks Sven for ur very quick response as usual

    Sorry I did not write bk earlier. I basically added a 'select values' step this transformation after get rows from result and it works. Also, I am able to run these kinda transformations stand alone by passing arguments in the window that pops up when 'run'.

    You're right that it is not meant to be run stand alone, but for testing purposes it suits me.

    Thanks again,
    Sowj.

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.