Skip to content

Instantly share code, notes, and snippets.

@SergeyAxenov
Last active March 15, 2017 05:15
Show Gist options
  • Save SergeyAxenov/f26ce38792c7d8bfacf3555eba3cb11a to your computer and use it in GitHub Desktop.
Save SergeyAxenov/f26ce38792c7d8bfacf3555eba3cb11a to your computer and use it in GitHub Desktop.
Zeppelin 0.6.2 - How to get all registered angular objects
// 1. Zeppelin InterpreterContext
// 2. How to get all angular objects registered in the note
z.angularBind("ax4_var","value")
val ctx = z.getInterpreterContext
ctx.getAngularObjectRegistry().getAllWithGlobal(ctx.getNoteId())
z.angularUnbind("ax4_var")
ctx.getAngularObjectRegistry().getAllWithGlobal(ctx.getNoteId())
// OUTPUT:
//ctx: org.apache.zeppelin.interpreter.InterpreterContext = org.apache.zeppelin.interpreter.InterpreterContext@1454e6d9
//res227: java.util.List[org.apache.zeppelin.display.AngularObject[_]] = [AngularObject{noteId='2CAEG92EB', paragraphId='null', object=value, name='ax4_var'}]
//res229: java.util.List[org.apache.zeppelin.display.AngularObject[_]] = []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment