-
-
Save sorenmacbeth/a3445412323faa490f3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn mk-edge-tap [id name class-name] | |
(let [md (thrift-meta-data class-name) | |
fields (for [f (.keySet md)] | |
[f (.getFieldName f)]) | |
vars (vec (map #(symbol (str "?" (second %))) fields)) | |
out-vars (conj vars (symbol "?pedigree"))] | |
`(defn ~(symbol (str name "-tap")) [source-dir#] | |
(let [tap# (split-data-tap source-dir# [~id])] | |
(<- ~out-vars | |
(tap# _ ?data) | |
(expand-data ?data :> ?pedigree ?du) | |
(expand-all ?du ~md :> ~@vars)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment