(ns Recallnack.core
(:use [cascalog.api]
[cascalog.more-taps :only (hfs-delimited)])
(:require [clj-time.core :as t])
(:require [clj-time.format :as f])
(:require [cascalog.ops :as c])
(:gen-class))
(def info
(hfs-delimited "/Volumes/SindhuHosamane/Master_thesis_docs/burner_changed.txt"
:delimiter ";"
:outfields ["?timestamp" "?assembly" "?sensor" "?value"]
:classes[String String String Float]
:skip-header? false))
(def info-tap
(<- [?timestamp ?value]
((select-fields info ["?timestamp" "?value"]) ?timestamp ?value)))
(def datefrom "12:05:2010 00:00:00")
(def dateto "12:05:2010 01:01:00")
(def custom-formatter (f/formatter "dd:MM:yyyy HH:mm:ss"))
(def hour-part (t/hour (f/parse custom-formatter datefrom)))
(def minute-part(t/minute (f/parse custom-formatter datefrom)))
(loop [hour-part 01]
(when (>= minute-part 00)
(?<- (stdout) [?timestamp-out ?value-out]
(info-tap ?timestamp ?value) (c/limit [1] ?timestamp ?value :> ?timestamp-out ?value-out)
)
(recur (+ minute-part 01))))
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks a lot . i got it wrong in my cascalog query. Now it worked.