PDA

View Full Version : Using Filter throws error



jbleuel
02-05-2006, 11:00 PM
Hi,


may be I didnÂÂ't understand it right... but isnÂÂ't it a simple join of two files?



In this case you donÂÂ't need to use filters. Instead use the Lookup- or Database Join step or use a join in the SQL table input.



If you like, post us your transformation for deeper insights.



Good luck - Jens

MattCasters
02-05-2006, 11:05 PM
(Original message by surenm, put in plain mode for readability)

I have two files (one contains BRAND ID & EID, the other contains BID + other fields). BRAND ID and BID represent the same thing.

I am interested in the 2nd file contents with EID from 1st added to the contents.

To get EID from the 1st file, I joined the two files and then tried using the filter to get the appropriate rows (where BRAND ID = BID).

I get the following error when I run the transformation.
Filter rows.0 - ERROR : Unexpected error in 'before evaluate condition' : java.lang.RuntimeException: Unexpected error evaluation condition [ BRAND ID = BID
] in part [Atomic : evaluate (function==)] for row:

[EID=101.0, BRAND ID =B01S, Price=10.0, BID=B01S, Reason=term, Date=2005/05/01 17:00:00.000]
java.lang.NullPointerException

MattCasters
02-05-2006, 11:07 PM
Jens,

Can you file a bug for this one? I'm "pressed" for time here ;-)
I'm also interested in the version number?
The evaluate() function shouldn't throw NullPointerExceptions right?

Thanks,
Matt

jbleuel
02-05-2006, 11:29 PM
Hi "surenm",

could you please send us your version number and the transformation?

We will investigate this further with bug ID 1514.

Cheers,
Jens

MattCasters
02-06-2006, 04:07 AM
I added some code-hardening in Value.compare() and Condition.evaluate().

Please grab the latest kettle.jar in Development packages and report back the results.

Thanks!

Matt

surenm
02-06-2006, 09:32 PM
I tried the new jar and the error does not appear any more.

Thanks for your prompt response.

What were the changes that were made ?

MattCasters
02-08-2006, 12:17 PM
Extra checks for null-pointers in Value objects in Compare, more specifically for BigNumber values.
Extra exceptions throws in Condition.evaluate() for missing values (not in your case)

Check the source code of Value and Condition, revisions 246-249

Matt