config.json
  • 13 Dec 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

config.json

  • Dark
    Light
  • PDF

Article summary

With Tag.bio, you don't always need to go through the arduous process of munging and restructuring your data. By way of a series of structured JSON files, you can tap into a series of powerful data parsing tools to analyze just the data you need.

The basic project structure consists of a config.json reference file and a config folder at the root of your project. Within the config folder are definition files for the entity_table.json, other_tables.json, and a folder for parsers.

config.json

The config.json file contains a series of path references for your entity_table, other_tables, and parsers. The paths are relative to the root of your project.

{
  "entity_table": "config/entity_table.json",
  "other_tables": "config/other_tables.json",
  "parsers": "all"
}

The parsers array can contain the individual parser objects of your project, or the file path for parser files you create. For new projects, you can set the parsers attribute with the string "all", which will automatically infer data types. This can be a handy way to begin your project.

entity_table.json

The entity_table is the master data table for your project. As is common with all table definitions, an alias is given by the developer. This alias is how the table will be referenced in the future. The unique_keys array contains the identifier for the primary entity of the data.

{
  "table": "patients.csv",
  "alias": "patients",
  "unique_keys": [
    "ID"
  ]
}


other_tables.json

The other_tables reference is how to assign joins from ancillary tables to the entity_table. The standard definition for other_tables is an array of objects, with each object being a table to join. The id_columns attribute is a key:value paired object used to define the linkage from the table being joined and the entity_table.

[
  {
    "table": "encounters.csv",
    "alias": "encounters",
    "id_columns": {
      "PATIENT": "ID"
    }
  }
]


parsers

The parsers array can contain the individual parser objects of your project, or the file path for parser files you create. Parsers are generally bundled together by table or by purpose so that they can be easily located. Check out the Parser Types page for more info on the variety of parser types available for columns, rows, and matrix parsers.


Was this article helpful?

What's Next