       :schema  airflow-measurement-schema }])
 
 (defn explode-nested-item [association item-string]
+  "Explodes a nested item, that is represented in the object coming from
+  the datastore as a json encoded string. Returns a list of vectors of
+  two elements, the first being the attribute key, and the second the value.
+  The key is expanded to <nested item name>_<attribute name>"
   (let [item (json/decode item-string)
         association-name   (:name   association)
         association-schema (:schema association)]

     association-schema)))

(defn explode-associated-items [association items]
  (let [association-name   (name (:name    association))
        association-schema (:schema  association)]
    (apply concat

      items))))

(defn explode-and-sort-by-schema [item schema]
  "Take a (profile) item from the datastore and converts into a list
  of pairs (represented as a vector) where the first element is the
  exploded key for the attribute and the second is the value"
  (let [exploded-item
         (mapcat
           (fn [attr]
