enhydrator icon indicating copy to clipboard operation
enhydrator copied to clipboard

Issue with JDCB Source with null values.

Open heppa opened this issue 8 years ago • 1 comments

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.

heppa avatar Dec 07 '16 10:12 heppa

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.

heppa avatar Dec 07 '16 10:12 heppa