Sign inSign up

asarkar/zeppelin

By asarkar

•Updated almost 8 years ago

Apache Zeppelin image.

Image
0

387

asarkar/zeppelin repository overview

⁠Getting Started

  1. Start Zeppelin:

    docker run --rm --name=zeppelin -p 8080:8080 -p 8081:8081 \
    -v ~/metrics:/srv/metrics/:ro \
    -d asarkar/zeppelin:0.7.0
    

    This exposes the Web UI on port 8080 and mounts host directory ~/metrics to /srv/metrics/ in the container.

  2. Go to http://localhost:8080⁠ and create a new note. Give it a name.

    The option may not be available until the circle on the right upper corner turns green.

  3. To load a bunch of JSON files, type the following and run it (using the > button). This uses a built-in Spark interpreter (the default).

    val df = spark.read.json("/srv/metrics/*.json")
    df.registerTempTable("metrics")
    

    This creates a temp table named metrics that you can query. To learn more about Sprak SQL, see this⁠.

    1. Spark will automatically infer the schema. To see the schema, run df.printSchema().
    2. To pass arguments to the Scala compiler, for example to view deprecation warnings, go to http://localhost:8080/#/interpreter⁠, click "edit", and add -deprecation to the args property.
  4. In another paragraph, start writing queries. For example:

    %sql select age, count(1) from metrics where age < 30 group by age order by age
    

    More examples can be found here: Zeppelin Tutorial⁠

    The output can be visualized in tabular or one of various graphical formats.

    Column names with periods in them have to be escaped by enclosing in backticks.

    See actuator-meets-zeppelin⁠ project for examples.

Tag summary

Content type

Image

Digest

Size

330 MB

Last updated

almost 8 years ago

docker pull asarkar/zeppelin