Skip to content

DEIMS Variable module

Dave Reid edited this page Jul 10, 2013 · 2 revisions

What used to be a content type in the Drupal 6 version is now a field type. This change was made because variables are not really content - they're metadata about a data sources, which is a good fit for field data. Variables store the following data:

  1. Label (corresponding with the column label in the raw CSV file)
  2. Name (a human-readable name)
  3. Definition (a human-readable description about the variable)
  4. Type (one of Nominal, Physical quantity, Date/Time, or Code list)
  5. Missing values (an array of key/values that are considered 'empty')
  6. Data (more specific stuff depending on what type of variable it is).

We could have used Field collection to create this field, but due to variables needing four different types, and different kind of UIs depending on the type, a custom field type was implemented.

Clone this wiki locally