In [ ]:
interp.load.cp(os.Path("/absolute/path/to/file.jar"))
In [ ]:
import $cp.`/absolute/path/to/file.jar`
Maven Dependency¶
- Notice that
%%
(ininterp.load.ivy
) and::
(inimport $ivy...
) automatically suffix the short version of the current Scala distribution (e.g.,_2.12
) to the artifact name. For example, if your current Scala distribution is 2.12, then the following 2 statements are equivalent.This is specific to Scala. You almost never need to useinterp.load.ivy("org.apache.spark" % "spark-core_2.12" % "2.3.1") interp.load.ivy("org.apache.spark" %% "spark-core" % "2.3.1")
%%
or::
when you add a Java library dependency.
In [ ]:
import $ivy.`org.apache.spark:spark-sql_2.12:2.4.2`
import $ivy.`org.apache.spark::spark-sql:2.4.2`
In [ ]:
interp.load.ivy("org.apache.spark" % "spark-core_2.12" % "2.4.2")
interp.load.ivy("org.apache.spark" %% "spark-sql" % "2.4.2")
Almond Jupyter/Lab API¶
In [ ]: