enhydrator
enhydrator copied to clipboard
Issue with JDCB Source with null values.
I might be missing something, but I tried to use enhydrator with a JDCB Source containing null values for certain columns. This was not working out of the box.
I fixed this for myself by checking for null in ResultSetToEntries, but I wanted to check with you first, whether this could be addressed differently instead before committing and sending a PR.
And btw: here is the code I'm currently using:
Source input = getSource(filePath); // getSource() returns a new JDBCResource based on ucanaccess.
VirtualSinkSource vss = new VirtualSinkSource();
PojoSink pojoSink = new PojoSink("*", Claim.class, (Consumer<Object>) o -> System.out.println("----------" + o), null);
Pump pump = new Pump.Engine()
//.flowListener(l-> System.out.println(l))
.from(input)
//.to(new LogSink("*"))
.to(vss)
.to(pojoSink)
.sqlQuery("select * from Claims;")
.build();
Memory memory = pump.start();
As explanation: I'm using ucanaccess to extract legacy data from MS Access databases. Don't know, if that makes a difference, but I believe that any JDCB source with null values could have issues.