[kepler-dev] parameter table in provenance module

DONGHOON KIM dhkim717 at gmail.com
Tue Nov 11 19:27:48 PST 2014


Dear Kepler folks,

I need to add one more table (e.g., parameter2) in Provenance database.
parameter2 table should have parameter information with different
properties. In other words, it includes some other information that
parameter table does not have.
so I am try to use _regparamterReal(Name obj, RegEntity re) because this
method add parameter information into parameter table.
so I tried to add parameter2 table. but I have a error message;  unknown
column in 'field list'
My question is how can I insert another table (i.e., parameter2) from
parameter table. I think the problem is that I should switch or initialize
for _psParameter2Insert for "PreparedStatement".
Below is the code in "org.kepler.provenance.sql.SQLRecording.java". Also
you can find where the error happens below.

line number around 1728

    /** Add an entity to the parameter table. */
    protected void _regParameterReal(NamedObj parameter, RegEntity re)
        throws RecordingException
    {
        String className = parameter.getClassName();
        String valueStr = "none";





        try //_psParameterInsert
        {
            synchronized(_psParameterInsert)
            {
                //_debug("going to insert parameter " +
_getNameableFullName(parameter) + " with id " + re.getId());

                _psParameterInsert.setInt(1, re.getId());
                _psParameterInsert.setString(2, className);


                if(parameter instanceof AbstractSettableAttribute)
                {
                    valueStr = ((AbstractSettableAttribute)parameter).
                        getValueAsString();
                }

                // replace null string with empty string.
                if(valueStr == null)
                {
                    valueStr = "";
                }

                //_debug(_getNameableFullName(parameter) + " value length =
" + valueStr.length());

                // XXX need to set truncated bit somewhere
                if(valueStr.length() > _maxParameterValueSize)
                {
                    //_debug("TRUNCATING!");
                    valueStr = valueStr.substring(0,
_maxParameterValueSize);
                }



                _psParameterInsert.setString(3, valueStr);

                _psParameterInsert.executeUpdate();

/*********** added by Donghoon
                _psParameter2Insert.setInt(1, re.getId());
                _psParameter2Insert.setString(2, className);
                _psParameter2Insert.setString(3, valueStr);

                //==>>>>error message this line  ; unknown column in 'field
list'  <<<===============
                _psParameter2Insert.setString(4, valueStr);

                _psParameter2Insert.executeUpdate();


            }


-- 
Donghoon Kim
Dept of Computer Science
North Carolina State University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20141111/0a47d160/attachment-0001.html>


More information about the Kepler-dev mailing list