Hi.
I'd like to use these widetap features. After a (re-parse), I have 33
fields, so I'd like to use :#> to specify just a couple of variables.
I tried the following code:
(ns metamx.openx_agg
(:use cascalog.api)
(:require [cascalog [workflow :as w] [predicate :as p] [vars :as v]
[ops :as c]])
(:gen-class))
(defn openx-data [dir]
(let [raw (hfs-textline dir)]
(<- [?current-time ?visitor-id]
(raw ?line)
(c/re-parse [(re-pattern "[^\001]")] ?line :#> 33 {0 ?current-
time, 29 ?visitor-id}))))
(defn compute-agg [output-tap openx-dir]
(let [openx (openx-data openx-dir)]
(?<- output-tap [?a ?b] (openx ?a ?b) )))
(defn -main [openx-dir output-dir] (compute-agg (stdout) openx-dir))
But the IDE complains immediately: "expected left paren, symbol or
literal ::" (highlighting the :#> operator).
And if I try to build, it complains with:
Exception in thread "main" java.lang.Exception: Unable to resolve
symbol: ?current-time in this context (____.clj:8)
Am I using it wrong?
Marc