zero-one-group/geni

Possible issue with example 2.5 from cookbook

bhougland18 opened this issue · 2 comments

  • I have read through the quick start and installation sections of the README.

Info

Info Value
Operating System Nixos 21.09
Geni Version 0.0.38
JDK openjdk version 11.0.9 2020-10-20
Spark Version 3.1.0

Problem / Steps to reproduce

I am working through the cookbook and encountered an error on example 2.5
https://github.com/zero-one-group/geni/blob/develop/docs/cookbook/part_02_selecting_rows_and_columns.md#25-selecting-only-noise-complaints

I entered in the following:

(-> complaints
    (g/filter (g/= :complaint-type (g/lit "Noise - Street/Sidewalk")))
    (g/select :complaint-type :borough :created-date :descriptor)
    (g/limit 3)
    g/show)   

I receive the following error:

Exectuion error (NoClassDefFoundError) at org.apache.spark.sql.catalyst.parser.AbstractSQLParser/parse (ParseDriver.scala:90).
Could not initialize class org.apache.spark.sql.catalyst.parser.SqlBaseLexer

Very odd! Are you using the geni uberjar from the repo's releases, the Geni lein template or some other way to run this? My guess is it's the Spark deps. Would you like to share your project.clj or deps.edn?

I used the Lein template and then connected to the remote Nrepl instance via the port.

I also get the same error in chapter 4 for the following example:


(def null-counts
  (-> raw-weather-mar-2012
      (g/agg (->> (g/column-names raw-weather-mar-2012)
                  (map #(vector % (g/null-count %)))
                  (into {})))
      g/first))

Here is my project.clj

https://pastebin.ubuntu.com/p/PgqYhvfGy6/