Skip to content

Database Versions

Flynn Duniho edited this page May 29, 2024 · 3 revisions

Version 1.4: Flattened Data

Released 3/9/22. See #198

The original Net.Create data format was based on the Google Fusion export format that encapsulated arbitrary fields in an attributes object. When reading and writing data, we converted back and forth between an internal representation which used a flat set of variables (e.g. node.type) to the encapsulated format (e.g. node.attributes.NodeType). This added unnecessary complexity to data handling, especially with regards to exporting, importing data and template streamlining.

With the implementation of exporting, importing, and template improvements, this seemed a natural time to also update the data format. It would simplify the implementation of those features.

Features and Changes

Mapping Fields

The old attributes fields have been mapped to root level objects.

NODES

  • node.attributes.Node_Type => node.type
  • node.attributes["Extra Info"] => node.info
  • node.attributes.Notes => node.notes

EDGES

  • edge.attributes.Relationship => edge.type
  • edge.attributes.Info => edge.info
  • edge.attributes.Citations => edge.citation
  • edge.attributes.Notes => edge.notes
  • edge.attributes.Category => edge.category

Auto Migration

When you open a old pre-version 1.3 dataset file, we will automatically try to migrate the data to the new format. (You can see the migration function in ns-logic.m_MigrateData:1031).

The migrated dataset is then saved on top of the old data.

NOTE that the original attribute data remains in the .loki database file for reference. When you re-open the dataset, NetCreate will ignore the original attributes and just load the new attributes.

Export Labels set via Template's exportLabel property

Export labels can now be set via Template. Change the template's exportLabel to map internal variables to different csv field headers. For example, for the notes field, you can change the exportLabel to Description.

Implications

  • Datasets created in this version of the app will not be backward compatible! You have to use Version 1.4+ (the code hasn't been tagged 1.4 yet, but will be) to read these datasets.
  • This gets us about halfway towards a system where you can define arbitrary fields in the Template and have NetCreate automatically use them. e.g. You can add a new Gender field in the template and it would be automatically made available in the Node Editor, Node Table, Exports, and Filters.

Version 1.3

Clone this wiki locally