Hi,
looks like DBLookup does not really use the metadata attribute... i declared it in my graph as such:
....
<Connection id="CONN_1" type="JDBC" driverLibrary="D:/mysql-connector-java-5.0.5.jar" dbDriver="com.mysql.jdbc.Driver" dbURL="jdbc:mysql://localhost:3306/core?autoReconnect=true" user="appuser" password="appuser" />
<LookupTable id="mylookup" dbConnection="CONN_1" metadata="foo" type="dbLookup">
<attr name="sqlQuery"><![CDATA[select lookup_value from lookup_types where lookup_code=?]]></attr>
</LookupTable>
.....
and in my tranformation class's init() method, i just have:
....
LookupTable lookup = getLookupTable(mylookup);
lookup.setLookupKey("dummy");
if (!lookup.isInitialized()) {
lookup.init();
}
....
and i have no problem getting my lookup_value from lookup_types table...
so why is the metadata attribute mandatory (according to the documentation at http://wiki.clovergui.net/doku.php?id=g ... s#dblookup)?
when will it be used and what is it for then?
thanks,
al
looks like DBLookup does not really use the metadata attribute... i declared it in my graph as such:
....
<Connection id="CONN_1" type="JDBC" driverLibrary="D:/mysql-connector-java-5.0.5.jar" dbDriver="com.mysql.jdbc.Driver" dbURL="jdbc:mysql://localhost:3306/core?autoReconnect=true" user="appuser" password="appuser" />
<LookupTable id="mylookup" dbConnection="CONN_1" metadata="foo" type="dbLookup">
<attr name="sqlQuery"><![CDATA[select lookup_value from lookup_types where lookup_code=?]]></attr>
</LookupTable>
.....
and in my tranformation class's init() method, i just have:
....
LookupTable lookup = getLookupTable(mylookup);
lookup.setLookupKey("dummy");
if (!lookup.isInitialized()) {
lookup.init();
}
....
and i have no problem getting my lookup_value from lookup_types table...
so why is the metadata attribute mandatory (according to the documentation at http://wiki.clovergui.net/doku.php?id=g ... s#dblookup)?
when will it be used and what is it for then?
thanks,
al
-
Hi,
there are really not needed metadata for common usage of DBLookupTable - they are created from query result set during first query execution. But lack of this metadata would cause problems when using such table in writer component for partitioning or in CTL.
Please sign in to leave a comment.
Comments 1