Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Why does preview option throw an error when using switch / step with a particular excel file?

Ask Question
2018/03/01 11:48:00 - Spoon - Using legacy execution engine
2018/03/01 11:48:00 - Spoon - Transformation opened.
2018/03/01 11:48:00 - Spoon - Launching transformation [error]...
2018/03/01 11:48:00 - Spoon - Started the transformation execution.
2018/03/01 11:48:00 - error - Dispatching started for transformation [error]
2018/03/01 11:48:00 - Microsoft Excel Input.0 - Finished processing (I=108, O=0, R=0, W=108, U=0, E=0)
2018/03/01 11:48:00 - Switch / case.0 - Finished processing (I=0, O=0, R=108, W=108, U=0, E=0)
2018/03/01 11:48:00 - Dummy (do nothing).0 - Finished processing (I=0, O=0, R=108, W=108, U=0, E=0)
2018/03/01 11:48:00 - Spoon - The transformation has finished!!

when run. However it throws the error:

2018/03/01 11:49:07 - error - Dispatching started for transformation [error]
2018/03/01 11:49:07 - Switch / case.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/03/01 11:49:07 - Switch / case.0 - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : java.lang.NullPointerException
2018/03/01 11:49:07 - Switch / case.0 -     at org.pentaho.di.trans.step.BaseStep.safeModeChecking(BaseStep.java:2129)
2018/03/01 11:49:07 - Switch / case.0 -     at org.pentaho.di.trans.step.BaseStep.handleGetRow(BaseStep.java:1942)
2018/03/01 11:49:07 - Switch / case.0 -     at org.pentaho.di.trans.step.BaseStep.access$100(BaseStep.java:147)
2018/03/01 11:49:07 - Switch / case.0 -     at org.pentaho.di.trans.step.BaseStep$DefaultRowHandler.getRow(BaseStep.java:4180)
2018/03/01 11:49:07 - Switch / case.0 -     at org.pentaho.di.trans.step.BaseStep.getRow(BaseStep.java:1797)
2018/03/01 11:49:07 - Switch / case.0 -     at org.pentaho.di.trans.steps.switchcase.SwitchCase.processRow(SwitchCase.java:65)
2018/03/01 11:49:07 - Switch / case.0 -     at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2018/03/01 11:49:07 - Switch / case.0 -     at java.lang.Thread.run(Thread.java:748)
2018/03/01 11:49:07 - Switch / case.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)
2018/03/01 11:49:07 - Microsoft Excel Input.0 - Finished processing (I=11, O=0, R=0, W=10, U=0, E=0)
2018/03/01 11:49:07 - error - Transformation detected one or more steps with errors.
2018/03/01 11:49:07 - error - Transformation is killing the other steps!
2018/03/01 11:49:07 - error - 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/03/01 11:49:07 - Spoon - The transformation has finished!!
2018/03/01 11:49:07 - error - 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/03/01 11:49:07 - error - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : Errors detected!

when Right-Click/Preview... is used on any of the steps and I am unable to preview the data in any of the steps that comes after Switch / case. While Preview data tab under Execution Results beneath is able to preview the data in all steps.

I tried to reproduce the error with a Generate Rows step or using another file but I was unsuccessful, so this seems to suggest that Switch / case dislikes something about my particular file which I couldn't determine at this time.

Why is this happening? How can I prevent it from happening?

True. The field with no name (or no type by the way), produce the error in the next steps. On right-click, you have useful "Input fields..." and "Output fields..." which lists the fields and help you to debug that sort of things. In particular, take the habit of using them systematically after certain steps (lookup, csv, Excel,..) – AlainD Mar 1, 2018 at 12:10

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.