AnsweredAssumed Answered

Upgrade to PDI 8 has changed the behavior of the "CSV Input" transformation and selecting the "Header row present?" option where empty files are concerned. In PDI 6 & 7 empty files (0 bytes) are tolerated, but in PDI 8  java.lang.NullPointerException is t

Question asked by Steven Payne on Apr 25, 2018
Latest reply on May 3, 2018 by Steven Payne

Upgrade to PDI 8 has changed the behavior of the "CSV Input" transformation and selecting the "Header row present?" option where empty files are concerned. In PDI 6 & 7 empty files (0 bytes) are tolerated, but in PDI 8  java.lang.NullPointerException is thrown. Anybody know if this is this by design or a bug?

 

Here is the dump in PDI 8:

2018/04/25 08:44:07 - Spoon - Using legacy execution engine

2018/04/25 08:44:07 - Spoon - Transformation opened.

2018/04/25 08:44:07 - Spoon - Launching transformation [BA3_WorkEmail_Import4]...

2018/04/25 08:44:07 - Spoon - Started the transformation execution.

2018/04/25 08:44:07 - BA3_WorkEmail_Import4 - Dispatching started for transformation [BA3_WorkEmail_Import4]

2018/04/25 08:44:07 - Read Success File.0 - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : Unexpected error

2018/04/25 08:44:07 - Read Success File.0 - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : org.pentaho.di.core.exception.KettleException:

2018/04/25 08:44:07 - Read Success File.0 - java.lang.NullPointerException

2018/04/25 08:44:07 - Read Success File.0 -  at java.lang.Thread.run (null:-1)

2018/04/25 08:44:07 - Read Success File.0 -  at org.pentaho.di.trans.step.RunThread.run (RunThread.java:62)

2018/04/25 08:44:07 - Read Success File.0 -  at org.pentaho.di.trans.steps.csvinput.CsvInput.processRow (CsvInput.java:133)

2018/04/25 08:44:07 - Read Success File.0 -  at org.pentaho.di.trans.steps.csvinput.CsvInput.openNextFile (CsvInput.java:330)

2018/04/25 08:44:07 - Read Success File.0 -  at org.pentaho.di.trans.steps.csvinput.CsvInput.createFieldMapping (CsvInput.java:403)

2018/04/25 08:44:07 - Read Success File.0 -  at org.pentaho.di.trans.steps.csvinput.CsvInput.readFieldNamesFromFile (CsvInput.java:434)

2018/04/25 08:44:07 - Read Success File.0 -  at org.pentaho.di.trans.steps.csvinput.CsvInput.removeEnclosure (CsvInput.java:460)

2018/04/25 08:44:07 - Read Success File.0 -

2018/04/25 08:44:07 - Read Success File.0 - at org.pentaho.di.trans.steps.csvinput.CsvInput.openNextFile(CsvInput.java:395)

2018/04/25 08:44:07 - Read Success File.0 - at org.pentaho.di.trans.steps.csvinput.CsvInput.processRow(CsvInput.java:133)

2018/04/25 08:44:07 - Read Success File.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)

2018/04/25 08:44:07 - Read Success File.0 - at java.lang.Thread.run(Unknown Source)

2018/04/25 08:44:07 - Read Success File.0 - Caused by: java.lang.NullPointerException

2018/04/25 08:44:07 - Read Success File.0 - at org.pentaho.di.trans.steps.csvinput.CsvInput.removeEnclosure(CsvInput.java:460)

2018/04/25 08:44:07 - Read Success File.0 - at org.pentaho.di.trans.steps.csvinput.CsvInput.readFieldNamesFromFile(CsvInput.java:434)

2018/04/25 08:44:07 - Read Success File.0 - at org.pentaho.di.trans.steps.csvinput.CsvInput.createFieldMapping(CsvInput.java:403)

2018/04/25 08:44:07 - Read Success File.0 - at org.pentaho.di.trans.steps.csvinput.CsvInput.openNextFile(CsvInput.java:330)

2018/04/25 08:44:07 - Read Success File.0 - ... 3 more

2018/04/25 08:44:07 - Read Success File.0 - Finished processing (I=0, O=0, R=0, W=0, U=0, E=1)

2018/04/25 08:44:07 - BA3_WorkEmail_Import4 - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : Errors detected!

2018/04/25 08:44:07 - Spoon - The transformation has finished!!

2018/04/25 08:44:07 - BA3_WorkEmail_Import4 - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : Errors detected!

2018/04/25 08:44:07 - BA3_WorkEmail_Import4 - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : Errors detected!

2018/04/25 08:44:07 - BA3_WorkEmail_Import4 - Transformation detected one or more steps with errors.

2018/04/25 08:44:07 - BA3_WorkEmail_Import4 - Transformation is killing the other steps!

 

 

PDI 7 returns (for the same script):

 

2018/04/25 09:11:43 - Spoon - Transformation opened.

2018/04/25 09:11:43 - Spoon - Launching transformation [BA3_WorkEmail_Import4]...

2018/04/25 09:11:43 - Spoon - Started the transformation execution.

2018/04/25 09:11:45 - BA3_WorkEmail_Import4 - Dispatching started for transformation [BA3_WorkEmail_Import4]

2018/04/25 09:11:45 - Read Success File.0 - Header row skipped in file 'C:\PeopleStrategy\BA3\BA3_WorkEmail_Import_Success.csv'

2018/04/25 09:11:45 - Spoon - The transformation has finished!!

Outcomes