Zeppelin Usage Notes

This page currently contains exactly one tip about using Zeppelin with the Splice Machine database service; this will grow into a loose collection of tips over time.

Use Full Classpath!

If you’re coding a Zeppelin notebook in Java, you must specify the full class of imported classes, such as java.sql.Timestamp; otherwise, an error occurs.

For example, this generates an error:

%spark
import java.util.Date
import java.sql.
{Connection, Timestamp}
classOfTimestamp
classOffoo
val tt = Timestamp.valueOf("2261-12-31 00:00:00")
class foo extends Object { val xx: Timestamp = Timestamp.valueOf("2261-12-31 00:00:00") }

import java.util.Date
import java.sql.{Connection, Timestamp}
res12: Classjava.sql.Timestamp = class java.sql.Timestamp
res13: Classfoo = class foo
tt: java.sql.Timestamp = 2261-12-31 00:00:00.0
<console>:13: error: not found: type Timestamp
val xx: Timestamp = Timestamp.valueOf("2261-12-31 00:00:00")
^
<console>:13: error: not found: value Timestamp
val xx: Timestamp = Timestamp.valueOf("2261-12-31 00:00:00")
^
ERROR

The error is resolved by specifying the full classpath:

%spark
import java.util.Date
import java.sql.
{Connection, Timestamp}
classOfTimestamp
classOffoo
val tt = Timestamp.valueOf("2261-12-31 00:00:00")
class foo extends Object { val xx: java.sql.Timestamp = java.sql.Timestamp.valueOf("2261-12-31 00:00:00") }

import java.util.Date
import java.sql.{Connection, Timestamp}
res14: Classjava.sql.Timestamp = class java.sql.Timestamp
res15: Classfoo = class foo
tt: java.sql.Timestamp = 2261-12-31 00:00:00.0
defined class foo
FINISHED