Anand
Anand

Reputation: 1841

Pentaho kettle transformation - Empty CSV file input step skip subsequent steps

I have a kettle transformation which has a csv file input step. I would like the transformation to just skip all the subsequent steps in the transformation if the csv file has no data (empty). Is there a way to achieve this?

Upvotes: 0

Views: 3115

Answers (2)

giogix
giogix

Reputation: 799

Otherwise, you could use the step "Get File Names". This returns many fields, one of which is the field "size". After this you can put a "Filter rows" step that sends the flow to a "Dummy" step if the size is equale to 0.

Upvotes: 1

Sra1
Sra1

Reputation: 670

Try the step "Detect Empty Stream" and check for NULL condition for any one of the columns from the CSV.

Appending a link from PDI Wiki: http://wiki.pentaho.com/display/EAI/Detect+empty+stream

Upvotes: 1

Related Questions