splicemachine.notebook module

This module contains helper functions and tools for use inside of a Jupyter Notebook

get_mlflow_ui(experiment_id=None, run_id=None)[source]

Display the MLFlow UI as an IFrame

Parameters
  • experiment_id – (int or str) Optionally the experiment id to load into view

  • run_id – (str) Optionally the run_id to load into view. If you pass in a run_id you must pass an experiment_id

Returns

(IFrame) An IFrame of the MLFlow UI

get_spark_ui(port=None, spark_session=None)[source]

Display the Spark Jobs UI as an IFrame at a specific port

Parameters
  • port – (int or str) The port of the desired spark session

  • spark_session – (SparkSession) Optionally the Spark Session associated with the desired UI

Returns

hide_toggle(toggle_next=False)[source]

Function to add a toggle at the bottom of Jupyter Notebook cells to allow the entire cell to be collapsed.

Parameters

toggle_next – Bool determine if the toggle should hide the current cell or the next cell

run_sql(sql)[source]

Runs a SQL statement over JDBC from the Splice Machine managed Jupyter notebook environment. If you are running outside of the Splice Jupyter environment, you must have a sql kernel and magic set up and configured.

Parameters

sql – The SQL to execute