Differences between revisions 2 and 3
Revision 2 as of 2007-11-13 09:35:14
Size: 2803
Editor: solpc2
Comment:
Revision 3 as of 2007-11-13 09:35:34
Size: 2800
Editor: solpc2
Comment:
Deletions are marked like this. Additions are marked like this.
Line 49: Line 49:
-->

create_series

Usage: create_series {-f} file.jsd

optional args:

  • {dbhost=hmidb.stanford.edu} - Database machineBR {dbname=jsoc} - Name of main DRMS databaseBR {dbuser=$USER} - Database login nameBR {dbpasswd=NULL} - Database password, obtained from /home/<dbuser>/.pgpass by defaultBR

Create_series reads a [wiki:Jsd JSOC Series Definition file] (.jsd) and creates the necessary tables in the DRMS database to create the described series. The "force" flag (-f) tells create_series to replace an existing series definition with the new one. Since this removes all the metadata for a series - essentially deleting the series - the user is prompted to confirm. Except for initial debugging of the .jsd file it is probably an error to use the -f flag.

create_series should not be run as part of a drms_run session.

By default, all series are created with univerasl select (read) permission, but update and insert permission for the owner only. For instructions on modifying the permissions of a data series, see http://jsoc.stanford.edu/trac/wiki/IngestData

The following description on series permission has not been implemented. By default, a series is readable by database role 'jsoc'. Utilities to change series permission are likely to be provided outside of the create_series program.

The "perm" (permissions) argument is used to grant or remove access to the series to other users.
The series belongs to the current user (you), and if privileges are not otherwise granted
you will be the only one able to read or change the series.  The options are to grant:
 * "s": read (aka select); 
 * "i": insert; and 
 * "u": update capabilities. 
 * "p": private - removes permissions from others.
If none are specified(the default) then the series may be read by others. If you specify ''perm=p'' then 
the series will be private to you. Others will be able to read
the series definition in the master tables, but the data of the series itself will not be accessible.
Note that "update" involves deleting all of the records and is subject to the same concerns as the "-f" flag.

Except in special circumstances only the default permissions or ''perm=p'' should be used.

So 

  create_series perm=siu blah.jsd 

creates a "public" table. 

  create_series perm=s blah.jsd 

creates a table that can be read by others but only modified by you,
while
  create_series blah.jsd 

creates a private table.

Messages

Note that if your JSD file defines more than one prime keyword (in the Index specification) create_series will announce e.g. for series "xxyz" that:

"NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "xxyx_pkey" for table "xxyx"

This is normal.

JsocWiki: DrmsCreateSeriesCmd (last edited 2013-05-01 04:35:26 by localhost)