Github user Leemoonsoo commented on the issue: https://github.com/apache/zeppelin/pull/2096 Thanks @tinkoff-dwh for the contribution. I've seen #2078. If `precode` is going to be added to all interpreter, how about create some facility that runs code when initialize interpreter and then make feature based on it? How about extend [Interpreter.Hook()](https://github.com/apache/zeppelin/blob/branch-0.7/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/Interpreter.java#L208) which currently has [PRE_EXEC](https://github.com/apache/zeppelin/blob/branch-0.7/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterHookRegistry.java#L143) and [POST_EXEC](https://github.com/apache/zeppelin/blob/branch-0.7/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterHookRegistry.java#L146) as event type that make code run before and after the interpret() call respectively. I think we can add event type such as `AFTER_OPEN`, `BEFORE_CLOSE`. Then with minimum modification of each interpreter, we can have the feature.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---