SQL Handler

SQLH and Hyrax

Pre requirements: LIBPQ .

The software developed is a Hyrax plugin, useful to add SQL Query capabilities to the BES server. It consists in a fully functional SQL handler that you can customize and expand. In this ALPHA release you can:

  • Use OLFS to set constraints
  • Set complex SQL query into the dataset file (Join, union)
  • Set constraints into the dataset
  • Set database password access into the dataset file OR using constraints

BES Software

BES is a high-performance back-end server software framework that allows data providers more flexibility in providing end users views of their data. The current OPeNDAP data objects (DAS, DDS, and DataDDS) are still supported, but now data providers can add new data views, provide new functionality, and new features to their end users through the BES modular design. Providers can add new data handlers, new data objects/views, the ability to define views with constraints and aggregation, the ability to add reporting mechanisms, initialization hooks, and more.

OPeNDAP provides the tools to build these new modules that can then be dynamically loaded into the BES.


Hyrax is the next generation server from OPeNDAP. It utilizes a modular design that employs a light weight Java servlet (aka OLFS) to provide the public-accessible client interface, and a back-end daemon, the BES to handle the heavy lifting. The BES uses the same handlers that are used with Server3 (also know as the CGI Server) but loads those at run time.


  • The servlet architecture is faster, more robust, and secure than CGI invoked Perl scripts.
  • A single installation can handle multiple data representations (hdf4, hdf5, netcdf, et c.)
  • THREDDS catalog functionality.
  • A prototype SOAP interface for OPeNDAP data services.

OLFS: The Hyrax Front End

The OPeNDAP Lightweight Frontend Servlet (OLFS) provides the public-accessible client interface for Hyrax. The OLFS communicates with the Back End Server (BES) to provide data and catalog services to clients. The OLFS implements the DAP2 protocol and supports some of the new DAP4 features. We hope that other groups will develop new front end modules that will implement other protocols.

New Features:

  • Provides THREDDS Catalogs responses
  • Prototype SOAP interface.

SQLH: SQL Handler

It’s an SQL handler used to connect databases to an OpeNDAP Hyrax (bes) server. Written in C++, it uses libpq to query DB. It implements many interfaces useful to give you an easy way to modify and to use it with other ODBC libraries. It is composed by tree Basic component:

The SQLTable class used to load the requested file. Alternatively:

  • A DAS object
  • A DDS object
  • A DataDDS object (a flat SQLSequence of strings)

The SQLFilterC(onstraint)E(xpression):
Used to parse the selected dataset and (or) the contraint expressions specified by the user (using the OLFS). It actually remove ALL the constraint expression from the URL and use it to build a filtered SQL query. So the filter operation is done by the SQL server and no constraints will be passed to the BES. You can easely change this behaviour.

The SQLConnector
It’s a component used to manage data transfer from the database (read-only). It’s composed by the following two components:

  • The SQLResultSet Specifies a common interface used to get values from the accessed database. Its methods are used in the SQLTable and SQLFilterCE.

  • The SQLConnection Specifies a common interface used to open and close a connection to the accessed database. Its methods are used in the SQLTable and SQLFilterCE using SQLConnector.