Difference between revisions of "CCDB 1.00"

From GlueXWiki
Jump to: navigation, search
Line 48: Line 48:
 
Type 'ccdb add <table name> /home/romanov/halld/ccdb/trunk/python/tests/test_table.txt #<comments>' to add the file to existing table (rows and columns must consist)
 
Type 'ccdb add <table name> /home/romanov/halld/ccdb/trunk/python/tests/test_table.txt #<comments>' to add the file to existing table (rows and columns must consist)
 
</pre>
 
</pre>
 +
 +
  
 
== ls update ==
 
== ls update ==

Revision as of 18:34, 11 April 2014

CCDB 1.00 release notes


Information about files and mktbl from file

It is usual situation when one already has data file and want to create table to store it. mktbl -f helps with this


> mktbl /test/haha -f python/tests/test_table.txt #my lonely comment
The command to create table: 

mktbl /test/haha -r 2 X Y Z #my lonely comment

Comments in file: 
Test assignment for software tests

Now one can copy it and run. It is not done automatically to be sure the values are reviewed.

The file is:

#Test assignment for software tests
#& X            Y            Z
  2.2          2.3          2.4         
  2.5          2.6          2.7     

You may notice that line with column names starts with #& while normal comments starts with plain #

One can use column types right there:

#& X=int            Y=int            NOT_Z=string

-f flag added to Info command also. info -f gives the info of text files, how CCDB sees it.

 ~/halld/ccdb/trunk $ ccdb info -f $CCDB_HOME/python/tests/test_table.txt
Rows: 2
Columns: 3
Column names:
    X
    Y
    Z

Comments in file: 
Test assignment for software unit tests

Type 'ccdb mktbl -f /home/romanov/halld/ccdb/trunk/python/tests/test_table.txt' to see how to create a table for the file
Type 'ccdb add <table name> /home/romanov/halld/ccdb/trunk/python/tests/test_table.txt #<comments>' to add the file to existing table (rows and columns must consist)


ls update

When ls is used directly on a table name, it gives data versions (as vers command):

 ccdb ls /test/test_vars/test_table
/test/test_vars/test_table
(ID)   (Created)              (Modified)              (variation)     (run range)      (comments)
 5      2012-10-30 23-48-43    2012-10-30 23-48-43     subtest         0-inf           Test assignment for 
 4      2012-10-30 23-48-42    2012-10-30 23-48-42     default         0-inf           Test assignment for 
 1      2012-07-30 23-48-42    2012-07-30 23-48-42     default         0-inf           Test assignment for 


-l flag adds info about table like (info) command.

ccdb ls -l /test/test_vars/test_table

The flags of ls command changed too:

Lists directories and tables for current directory

- Accepts wildcards symbols '*', and '?'

- When used on single table name, gives table data version as 'vers <table name>' command

keys:
    -v or --variations   - prints all variations
    -t or --tables       - prints full path for all tables
    -d or --directories  - prints all directories
    -x or --dtree        - draws directory tree

    -l or --extended     - shows extended info when is used on table