input of "multiple" results

View: New views
2 Messages — Rating Filter:   Alert me  

input of "multiple" results

by Ethan Mallove :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I am unable to insert results if I have occur(r)ence set to "multiple". I
attached a very simple example that I am using like so:

$ date
Wed Jul 19 16:17:33 EDT 2006
$ cat pb3.in | perfbase input -v -u -d www/inp_simple.xml -
#* importing data from
    - (parsed according to www/inp_simple.xml)
#* Parsing input description from XML file www/inp_simple.xml
#* Processing data file  -
#+ Creating new run with index 7
$ perfbase ls -l --exp=simple -v --show=once,multiple | tail -2
6       postgres        2006-07-19 16:03:20.00  7       #no_data#
7       postgres        2006-07-19 16:17:33.00  7       #no_data#

I can't seem to get data to appear in the field named "multiple", it's always
#no_data#. I also notice that that with the --debug option I don't see any SQL
INSERT|UPDATEs into the rundata table (is that where "multiple" data would go?).

#* SQL: UPDATE rundata_once SET once = '7' WHERE run_index = 9
#* SQL: UPDATE exp_metadata SET last_modified = %s ('2006-07-19 16:25:21 ',)

Thanks,
Ethan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

test.tar (6K) Download Attachment

Re: input of "multiple" results

by Joachim Worringen-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ethan Mallove wrote:

> Hello,
>
> I am unable to insert results if I have occur(r)ence set to "multiple". I
> attached a very simple example that I am using like so:
>
> $ date
> Wed Jul 19 16:17:33 EDT 2006
> $ cat pb3.in | perfbase input -v -u -d www/inp_simple.xml -
> #* importing data from
>     - (parsed according to www/inp_simple.xml)
> #* Parsing input description from XML file www/inp_simple.xml
> #* Processing data file  -
> #+ Creating new run with index 7
> $ perfbase ls -l --exp=simple -v --show=once,multiple | tail -2
> 6       postgres        2006-07-19 16:03:20.00  7       #no_data#
> 7       postgres        2006-07-19 16:17:33.00  7       #no_data#
>
> I can't seem to get data to appear in the field named "multiple", it's always
> #no_data#. I also notice that that with the --debug option I don't see any SQL
> INSERT|UPDATEs into the rundata table (is that where "multiple" data would go?).
>
> #* SQL: UPDATE rundata_once SET once = '7' WHERE run_index = 9
> #* SQL: UPDATE exp_metadata SET last_modified = %s ('2006-07-19 16:25:21 ',)

Hi Ethan,

the "problem" with values of type 'multiple' is that they need to be
stored in "sets", which is one row in the rundata table. perfbase needs
to decide when the set of 'multiple' values is ready to be stored. This
is more complex than it might seem. I..e, it's also possible that a
value of a set has no content assigned when the set is stored if it has
a default value of NULL.

The default behaviour is to assume that 'multiple' values found in a
table (which means they are specified within a 'tabular_location' in the
input description) do form a set which is stored after the table row has
been parsed.

However, it is also possible to gather content for the values of such a
set one-by-one, i.e. by using named_location's as you did. The problem
now is to decide when a set is complete.

For this reason, you need to help perfbase and tell it when a set is
considered to be complete. This is done via the "mode" attribute of the
named location. Thus, you need to specify in your input description:

<named_location mode="set">
   ....

</named_location>

You are right if you say (I anticipate this....), that in this case with
only a single value of type 'multiple', perfbase could be smarter and
store the set right away. I will add this.

  Joachim

--
Joachim Worringen, Software Architect, Dolphin Interconnect Solutions
phone ++49/(0)228/324 08 17 - http://www.dolphinics.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...