title: Run a Zeppelin notebook from another Zeppelin notebook
body: <p>I am looking for a way to run a Zeppelin notebook from another Zeppelin notebook. Similar to the <a href="https://docs.azuredatabricks.net/user-guide/notebooks/index.html#run-a-notebook-from-another-notebook" rel="nofollow noreferrer">%run magic command in a Databricks notebook</a> and roughly equivalent to a <code>:load</code> command in <code>spark-shell</code> REPL or an <code>import</code> statement in Python.</p>
  
  <p>It should wait for all enabled paragraphs of the other notebook to run. The execution should stop on the first executed paragraph with error status. All variables defined in that other notebook should become available in the current notebook. It should also work in multiuser mode.</p>
  
  <p>I have found the following example command to work but only in non authenticated mode.</p>
  
  <pre><code>%sh
  curl &gt;/dev/null -X POST -s \
  http://$HOSTNAME:$ZEPPELIN_PORT/api/notebook/job/2DJ4HPCJG &amp;&amp; \
  curl -s http://$HOSTNAME:$ZEPPELIN_PORT/api/notebook/job/2DJ4HPCJG \
  | grep -vq '"status":"ERROR"'
  </code></pre>
  
  <p>Also, the <a href="https://github.com/apache/zeppelin/blob/e71fac3754f540c91bdb08529b26cd76d18297d4/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/BaseZeppelinContext.java#L331" rel="nofollow noreferrer">ZeppelinContext#runNote()</a> method works with authenticated mode but runs asynchronously. I have not found a way to detect the error and stop the execution. </p>
  
  <p>I would appreciate your solution that satisfies all the above requirements or ideas on solving my partial problems noted above.</p>