The virtual table supports reading, creating/inserting and deleting data in a CDF file.
Common Data Fromat (CDF) is a self-describing data format for the storage of scalar and multidimensional data in a platform- and discipline-independent way. CDF is used in Space Physics and curated by the NASA GSFC: https://cdf.gsfc.nasa.gov/
The SQLite virtual table for CDF files can be installed by cloning the git repository.
Change to the src
directory. The following further instructions have so far been tested
only with Linux:
Typing make
compiles a cdf.so
shared object, which can be loaded as a runtime
extension:
-
in the C API with the function
sqlite3_load_extension
; -
in SQL with the function
load_extension
, i.e.SELECT load_extension(...)
; -
in the CLI with the dot command
.load
First the loading of extensions in SQLite must have enabled, see here. In the CLI the loading of extension is enabled by default.
A CDF file is opened by
CREATE VIRTUAL TABLE xy USING cdffile('Mission_Intstr_YYYYMMDDThhmmss');
File `testcdfn.sql` is a script for the SQLite CLI `sqlite3`, with examples how to create
a CDF files with zVariables and to insert records and attributes.
Examples: