python - Pentaho PDI: Metadata related Null Pointer Exception in Scripting task -


using pentaho pdi 6, with:

a) csv input on .csv (4 row .csv ibm), ascii file encoding (preview rows works fine)

connected to

b) cpython script executor, installable tools -> marketplace. assumes python, pandas, numpy installed. script settings:

configure, input frames: (previous step), df
python script, manual python script: df.replace(to_replace= "\[|\]|'|\"", value='', regex=true, inplace=true)
output fields, output fields: (column names, string type)

throws

2016/07/25 10:45:21 - cpython script executor.0 - error (version 6.1.0.1-196, build 1 2016-04-07 12.08.49 buildguy) : unexpected error  2016/07/25 10:45:21 - cpython script executor.0 - error (version 6.1.0.1-196, build 1 2016-04-07 12.08.49 buildguy) : java.lang.nullpointerexception  2016/07/25 10:45:21 - cpython script executor.0 - 	at org.pentaho.python.pythonsession.rowstopythondataframe(pythonsession.java:389)  2016/07/25 10:45:21 - cpython script executor.0 - 	at org.pentaho.di.trans.steps.cpythonscriptexecutor.cpythonscriptexecutor.rowstopydataframe(cpythonscriptexecutor.java:458)  2016/07/25 10:45:21 - cpython script executor.0 - 	at org.pentaho.di.trans.steps.cpythonscriptexecutor.cpythonscriptexecutor.processbatch(cpythonscriptexecutor.java:276)  2016/07/25 10:45:21 - cpython script executor.0 - 	at org.pentaho.di.trans.steps.cpythonscriptexecutor.cpythonscriptexecutor.processrow(cpythonscriptexecutor.java:243)  2016/07/25 10:45:21 - cpython script executor.0 - 	at org.pentaho.di.trans.step.runthread.run(runthread.java:62)  2016/07/25 10:45:21 - cpython script executor.0 - 	at java.lang.thread.run(unknown source)  2016/07/25 10:45:21 - cpython script executor.0 - finished processing (i=0, o=0, r=3, w=0, u=0, e=1)

previous debugging suggests processrow might not able determine metadata type error doesn't indicate this.

question: what's proper way set scripting task read in .csv w/o throwing nullpointerexceptions?

edit - error reproduced source materials well. see: mark hall, cpython scripting , example .zip file

edit 1 - python in command prompt gives

c:\users\*****>python

python 3.5.2 (v3.5.2:4def2a2901a5, jun 25 2016, 22:01:18) [msc v.1900 32 bit (intel)] on win32 type "help", "copyright", "credits" or "license" more information.

i not running anaconda (too heavy weight) , version of python .1 ahead, might impacting things hope plugin python version agnostic unless python binary programming interface changed or something.

edit 2 - can't attach kettle file example files mark hall above reproduce same issue encountered.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -