Databank formats

The Gekko databanks come in three variants, listed chronologically:

  • 1.0. (July 2011). The file extension is .tsdx. Inside this zip-file there is a .tsd file, and a xml file with meta-information (does not state the databank format number, which is implicitly “1.0”). Only supports timeseries. Can be read by Gekko 1.3.1 and later.
  • 1.1. (November 2012). The file extension is .tsdx or .gbk. Inside there is a binary protobuffer file (either with extension .bin (older) or .data (newer)), and a xml file with meta-information, where databankVersion = “1.1”. Only supports timeseries. Can be read by Gekko 1.5.8 and later.
  • 1.2. (November 2018). The file extension is .gbk. Inside there is a binary protobuffer file (databank.data) and a xml file with meta-information (DatabankInfo.xml), where databankVersion = “1.2”. It supports seven variable types: timeseries (including array-series), val, date, string, list, map, matrix. It can be read by Gekko 3.0 and 3.1.x (but also partially (at least normal timeseries) by the older Gekko 2.3.13, Gekko 2.4, and Gekko 2.5.x). Future variable types or new timeseries frequencies implemented in the Gekko 3.1.x versions should not crash the reading capabilities of Gekko 2.3.13, 2.4, 2.5.x or 3.0. In Gekko 2.4 or 2.5.x, such unknown variables are simply skipped while reading, whereas Gekko 3.0 and 3.1.x will read them, but treat them as null values.

Regarding data traces, these have their own independent versions that are the following:

  • 1.0. (March 2024). Data traces are stored inside the .gbk zip file, in the file trace.data. The xml file will state that traceVersion = “1.0”. These traces can be read by Gekko versions >= 3.1.16. For a Gekko < 3.1.16, such trace data are simply skipped. Hence, if a Gekko < 3.1.6 reads a Gekko >= 3.1.16 databank with traces, these traces are lost.

The protobuf format used by databank versions 1.1 and 1.2 is an open and free dataformat, originally developed by Google. Citation: “A language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler”. Protobuffer files can be read/written by many computer languages, for instance Python or R etc. etc. Gekko uses protobuf-net internally for the C# language. All in all, don’t be scared of storing data in protobuffer files: they will always be readable one way or the other! For instance, you may try to create a (preferably small) Gekko .gbk databank, rename .gbk to .zip, and open up the .zip file. Inside, unpack the file databank.data (or trace.data). Next go to this decoding page, select “File” in the drop-down, open the file, and inspect the data.