FAQ
I'm trying to mock up a very simple query and hitting an error I can't
understand. Here is the query:

(def animals [[{:entity "ANIMAL" :status "ACTIVE"}]
               [{:entity "ANIMAL" :status "ACTIVE"}]
               [{:entity "ANIMAL" :status "INACTIVE"}]
               [{:entity "ANIMAL" :status "DELETED"}]
               [{:entity "ANIMAL" :status "MISSING"}]])

(defmapfn entity-status
   [m]
   [(:entity m) (:status m)])

(defn entity-status-counts
   [animals-tap]
   (<- [?entity ?status ?count]
       (animals-tap ?animal-data)
       (entity-status ?animal-data :> ?entity ?status)
       (c/count ?status :> ?count)))

and when I try to run it using (?- (stdout) (entity-status-counts animals)) I
get the following error:

IllegalArgumentException fields arguments must be same size, from:
[{1}:'?animal-data'] to: [{?}:ALL] cascading.pipe.assembly.Rename.<init>
(Rename.java:55)

Any ideas what I'm doing wrong here? I'm using Cascalog 2.1.0.

Thanks,

Dave

--
You received this message because you are subscribed to the Google Groups "cascalog-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cascalog-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Soren Macbeth at Apr 2, 2014 at 3:45 pm
    (c/count) doesn't take any input vars. it's just (c/count ?count)

    On Wed, Apr 2, 2014 at 8:37 AM, David Kincaid wrote:

    I'm trying to mock up a very simple query and hitting an error I can't
    understand. Here is the query:

    (def animals [[{:entity "ANIMAL" :status "ACTIVE"}]
    [{:entity "ANIMAL" :status "ACTIVE"}]
    [{:entity "ANIMAL" :status "INACTIVE"}]
    [{:entity "ANIMAL" :status "DELETED"}]
    [{:entity "ANIMAL" :status "MISSING"}]])

    (defmapfn entity-status
    [m]
    [(:entity m) (:status m)])

    (defn entity-status-counts
    [animals-tap]
    (<- [?entity ?status ?count]
    (animals-tap ?animal-data)
    (entity-status ?animal-data :> ?entity ?status)
    (c/count ?status :> ?count)))

    and when I try to run it using (?- (stdout) (entity-status-counts
    animals)) I get the following error:

    IllegalArgumentException fields arguments must be same size, from:
    [{1}:'?animal-data'] to: [{?}:ALL] cascading.pipe.assembly.Rename.<init>
    (Rename.java:55)

    Any ideas what I'm doing wrong here? I'm using Cascalog 2.1.0.

    Thanks,

    Dave

    --
    You received this message because you are subscribed to the Google Groups
    "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to cascalog-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.


    --
    http://about.me/soren

    --
    You received this message because you are subscribed to the Google Groups "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to cascalog-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • David Kincaid at Apr 2, 2014 at 3:48 pm
    Good catch! That one always catches me, but isn't the immediate problem (it
    probably would be down the line). I modified it, but still getting the same
    error.
    On Wednesday, April 2, 2014 10:44:43 AM UTC-5, Soren Macbeth wrote:

    (c/count) doesn't take any input vars. it's just (c/count ?count)


    On Wed, Apr 2, 2014 at 8:37 AM, David Kincaid <kincai...@gmail.com<javascript:>
    wrote:
    I'm trying to mock up a very simple query and hitting an error I can't
    understand. Here is the query:

    (def animals [[{:entity "ANIMAL" :status "ACTIVE"}]
    [{:entity "ANIMAL" :status "ACTIVE"}]
    [{:entity "ANIMAL" :status "INACTIVE"}]
    [{:entity "ANIMAL" :status "DELETED"}]
    [{:entity "ANIMAL" :status "MISSING"}]])

    (defmapfn entity-status
    [m]
    [(:entity m) (:status m)])

    (defn entity-status-counts
    [animals-tap]
    (<- [?entity ?status ?count]
    (animals-tap ?animal-data)
    (entity-status ?animal-data :> ?entity ?status)
    (c/count ?status :> ?count)))

    and when I try to run it using (?- (stdout) (entity-status-counts
    animals)) I get the following error:

    IllegalArgumentException fields arguments must be same size, from:
    [{1}:'?animal-data'] to: [{?}:ALL] cascading.pipe.assembly.Rename.<init>
    (Rename.java:55)

    Any ideas what I'm doing wrong here? I'm using Cascalog 2.1.0.

    Thanks,

    Dave

    --
    You received this message because you are subscribed to the Google Groups
    "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to cascalog-use...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/d/optout.


    --
    http://about.me/soren
    --
    You received this message because you are subscribed to the Google Groups "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to cascalog-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • David Kincaid at Apr 2, 2014 at 4:02 pm
    Weird. I restarted my REPL and it's working now. Sorry for the false alarm
    (thanks for catching my problem with the count, Soren!)
    On Wednesday, April 2, 2014 10:48:10 AM UTC-5, David Kincaid wrote:

    Good catch! That one always catches me, but isn't the immediate problem
    (it probably would be down the line). I modified it, but still getting the
    same error.
    On Wednesday, April 2, 2014 10:44:43 AM UTC-5, Soren Macbeth wrote:

    (c/count) doesn't take any input vars. it's just (c/count ?count)

    On Wed, Apr 2, 2014 at 8:37 AM, David Kincaid wrote:

    I'm trying to mock up a very simple query and hitting an error I can't
    understand. Here is the query:

    (def animals [[{:entity "ANIMAL" :status "ACTIVE"}]
    [{:entity "ANIMAL" :status "ACTIVE"}]
    [{:entity "ANIMAL" :status "INACTIVE"}]
    [{:entity "ANIMAL" :status "DELETED"}]
    [{:entity "ANIMAL" :status "MISSING"}]])

    (defmapfn entity-status
    [m]
    [(:entity m) (:status m)])

    (defn entity-status-counts
    [animals-tap]
    (<- [?entity ?status ?count]
    (animals-tap ?animal-data)
    (entity-status ?animal-data :> ?entity ?status)
    (c/count ?status :> ?count)))

    and when I try to run it using (?- (stdout) (entity-status-counts
    animals)) I get the following error:

    IllegalArgumentException fields arguments must be same size, from:
    [{1}:'?animal-data'] to: [{?}:ALL] cascading.pipe.assembly.Rename.<init>
    (Rename.java:55)

    Any ideas what I'm doing wrong here? I'm using Cascalog 2.1.0.

    Thanks,

    Dave

    --
    You received this message because you are subscribed to the Google
    Groups "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to cascalog-use...@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.


    --
    http://about.me/soren
    --
    You received this message because you are subscribed to the Google Groups "cascalog-user" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to cascalog-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcascalog-user @
categoriesclojure, hadoop
postedApr 2, '14 at 3:37p
activeApr 2, '14 at 4:02p
posts4
users2
websiteclojure.org
irc#clojure

2 users in discussion

David Kincaid: 3 posts Soren Macbeth: 1 post

People

Translate

site design / logo © 2021 Grokbase