Comments (7)
To fix this change the following lines in JdbcMetaDataDialog: (Lines 332-335)
if (outputField.length == 0) continue;
tableItem.setText(1, outputField[0]);
if (outputField.length == 1) continue;
tableItem.setText(2, outputField[1]);
to:
if (outputField.length == 0) continue;
tableItem.setText(1, Const.NVL(outputField[0],""));
if (outputField.length == 1) continue;
tableItem.setText(2, Const.NVL(outputField[1],""));
from pentaho-pdi-plugin-jdbc-metadata.
@cdeptula thank you! Would you mind sending me a pull request? I'll happily accept it.
from pentaho-pdi-plugin-jdbc-metadata.
@cdeptula ok - I made the suggested changes but I still experienced a NPE in case output fields weren't configured. Fixed that too.
Will close since this is fixed in master. Will take a while before I bump the version for the marketplace.
from pentaho-pdi-plugin-jdbc-metadata.
Thanks @rpbouman. I was playing around with Issue #2 adding the Kettle Data Type to the output columns and did not have a clean branch to commit this fix to and then create the pull request.
The Const.NVL should have worked as it should do the same thing that your code does. It is a built in utility function in Pentaho. Anyway whenever assigning a value to a String field in the dialog it is a best practice to replace nulls with empty strings.
from pentaho-pdi-plugin-jdbc-metadata.
@cdeptula Have you tried if this solves your issue? Please re-open this issue if you're still experiencing a problem.
from pentaho-pdi-plugin-jdbc-metadata.
Yes I tested it and it worked. I am just surprised the Const.NVL did not work for you. It does not matter though.
from pentaho-pdi-plugin-jdbc-metadata.
@cdeptula Const.NVL probably works for me but I thought it would be better not to depend on it since the straight up java code works just as well and will work always. Keeping the issue closed you verified it works for you.
from pentaho-pdi-plugin-jdbc-metadata.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pentaho-pdi-plugin-jdbc-metadata.