RDH: Creating an SQL query from a DAP2 Constraint Expression

From OPeNDAP Documentation
Revision as of 17:10, 5 May 2009 by Ndp (talk | contribs) (New page: # Each projected variable should appear in the SELECT section. # The name of the Data Source (which is the DAP resource ID) should be used in the FROM section # Each clause should be ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
⧼opendap2-jumptonavigation⧽



  1. Each projected variable should appear in the SELECT section.
  2. The name of the Data Source (which is the DAP resource ID) should be used in the FROM section
  3. Each clause should be converted (where possible) into a condition in the WHERE section.
  4. Array sub-setting cannot be encoded in the SQL query and must happen once the row set response has been received.


For example, the request:

http://localhost/opendap/rdh/foo?v,u&lat<26&lat>24&lon<-126&lon>-128

would be converted in the SQL query:

SELECT v, u FROM foo WHERE lat<26 AND lat>24 AND lon<-126 AND lon>-128

Additionally we may wish to allow:

  1. The use of a limited regular expression type of matching in the CE which could be used to create SQL "LIKE" operators.
  2. Some kind of a range operation that would map to SQL "BETWEEN" operator.