Pentaho

 View Only

 Is it possible to save data from two different etl streams in the same excel file, but in different tabs?

  • Pentaho
  • Pentaho
Rafaela Raganham's profile image
Rafaela Raganham posted 10-29-2019 17:59
Sergio Ribeiro's profile image
Sergio Ribeiro

Hello @Rafaela Raganham​,

 

Having to writers to the same file will probably result in loss of data because concurrency problems will most certainly arise...

To successfully do that, one has to control the timing of the writing and that can be done by using the

"Block this step until steps finish" step:

 

Block

 

In the example above, both "Data grid" steps (your etl streams) will run at the same time.

The etl on top, will send the results to "Microsoft Excel writer" and the Excel writing will start immediately.

The bottom etl, however, sends data to the "Block this step until steps finish". This step should be configured to wait for the top "Microsoft Excel writer" step. Doing this, the step will "hold" the data and will only release it when "Microsoft Excel writer" step finishes all its writing; at that time, the "Microsoft Excel writer 2" step can start writing to the same Excel file without concurrency problems.

 

Regards,

 

Sérgio Ribeiro

Porto - Portugal

 

 

Ravikumar Kamma's profile image
Ravikumar Kamma

@Sergio Ribeiro​ 

I​ tried to create two sheets in same workbook, it always overwrite the first sheet.

I don't know what I am missing.

​Could you please point out some documentation?

Sergio Ribeiro's profile image
Sergio Ribeiro

Hello @Ravikumar Kamma​,

 

See if the small transformation I'm attaching helps you.

 

Regards,

 

Sérgio Ribeiro

Porto - Portugal

Ravikumar Kamma's profile image
Ravikumar Kamma

@Sergio Ribeiro​  Thanks