pentaho-labs / pentaho-cpython-plugin

This is a PDI plugin that allows execution of Python code.
Apache License 2.0
33 stars 21 forks source link

Problem with binary data #34

Open kiedanski opened 3 years ago

kiedanski commented 3 years ago

I am reading from a database in which a column is of type "varbinary(max)".

The table is used as input to a CPython module, and I'm getting the following error:

 output_model Binary : There was a data type error: the data type of java.lang.String object [value2] does not correspond to value meta [Binary]

I don't have Lazy conversion enabled

eicherjc commented 3 years ago

The database is an MS SQL Server?

And are you using the CPython step as the first step (or as in input step), are you using Python to read directly from the database? Or are you using a Table Input step to read the table and then hopping the Table Input step to the CPython step?

kiedanski commented 3 years ago

The database was MS SQL Server and I was using Cpython to read from the Database and writing to it.

I got around this problem simply by saving a hex string in the database instead.