Differences between revisions 5 and 6
Revision 5 as of 2008-01-08 07:36:42
Size: 3337
Editor: l5-m5
Comment:
Revision 6 as of 2008-01-10 05:19:32
Size: 3470
Editor: DNab4233cc
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
See the [http://hmi.stanford.edu/doc/JSOC/DRMS_dataset_names.pdf DRMS Dataset Names] document for more a more detailed discussion of the semantics. See the [http://hmi.stanford.edu/doc/JSOC/DRMS_dataset_names.pdf DRMS Dataset Names] document for more a more detailed discussion of the semantics (the Word document from which this file is generated is at /web/hmi/htdocs/development/JSOC_Documents/Drafts/DRMS_dataset_names.doc).

DRMS Names

See the [http://hmi.stanford.edu/doc/JSOC/DRMS_dataset_names.pdf DRMS Dataset Names] document for more a more detailed discussion of the semantics (the Word document from which this file is generated is at /web/hmi/htdocs/development/JSOC_Documents/Drafts/DRMS_dataset_names.doc).

In the extended BNF expression below white space is explicitly denoted <WS>. Literals are quoted as in 'literal', while \' indicates apostrophe character.

Basic non-terminals used:

 <Name> ::= <Letter> { <NameEnd> }
 <NameEnd> ::= ( <Letter> | <Digit> | '_' ) { <NameEnd> }
 <Letter> ::= 'a' | 'b' | ... | 'z' | 'A' | 'B' | ... | 'Z'
 <Digit> ::= '0' | '1' | ... | '9'
 <Value> ::= <Integer> | <Real> | <Time> | \'<String>\'
 <Time> ::= See SOI TN 94-116
 <Value_Increment> ::= <Integer> | <Real> | <Time_Increment>
 <Time_Increment> ::= <Real><Time_Increment_Specifier>
 <Time_Increment_Specifier> ::= 's' | 'm' | 'h' | 'd'

Main rules:

 <RecordSet>  ::= <SeriesName> <RecordSet_Filter> 
 <SeriesName> ::= <Name>

 <RecordSet_Filter> ::= '[' ( <RecordQuery> | <RecordList> ) ']' 
                         { <RecordSet_Filter> }

 <RecordQuery> ::= '?' <SQL where clause> '?'

 <RecordList> ::= ( ':'<RecnumRangeSet> | 
                    {<Primekey_Name>'='}<PrimekeyRangeSet> )
 <RecnumRangeSet> ::= <IndexRangeSet>
 <Primekey_Name> :: <Name>

 <PrimekeyRangeSet> ::= ( <IndexRangeSet> | <ValueRangeSet> )

 <IndexRangeSet> ::= ( '#' '^' |
                       '#' '$' |
                       '#' <Integer> |
                       '#' <Integer> '-' '#' { '@' <Integer> } |
                       '#' '-' '#' <Integer> { '@' <Integer> } |
                       '#' <Integer> '-' '#' <Integer> { '@' <Integer> } |
                       '#' <Integer> '/' <Integer> { '@' <Integer> } 
                      ) { ',' <IndexRangeSet> }

 <ValueRangeSet> ::= ( <Value> |
                       <Value> '-' <Value> { '@' <Value_Increment> } |
                       <Value> '/' <Value_Increment> { '@' <Value_Increment> } 
                      ) { ',' <ValueRangeSet> }

Some notes on usage:

  • Note first that more than one RecordSetFilter may be supplied. In this case each one can serve to limit the set of records selected. If no RecordSetFilter is specified the entire series is implied. Also note that SQL-like queries can be mixed with prime key queries.

  • If the RecordList is not a RecnumRangeSet (i.e. set of absolute record numbers) then it will be a set based on one of the prime keys.

  • The prime key name need not be specified but care must be used in this case. RecordLists with implied keyword names will be matched to the prime keys in the order in which the RecordLists are encountered. An empty ValueRangeSet in the special case where no prime keytword is given simply advances the prime key counter. Thus if you want to specify a range of e.g. four days in the second prime key you can use a form like:

seriesname[][2006.01.04/4d]
  • In a [? ... ?] clause, a test for value of a string type keyword must have the string to match in single quotes, i.e.

[? MagnetidType = 'Alpha' ?]

works, but using ".." or no quotes fails. This is because anything between the question marks are treated without modification as part of the SQL WHERE clause. For valid SQL syntax, please refer to http://www.postgresql.org/docs/8.2/static/sql-syntax.html

JsocWiki: DrmsNames (last edited 2013-05-01 04:35:25 by localhost)