How do I increase ZEPPELIN_LIMIT_INTERPETER_OUTPUT in the Python Interpreter?

Perform the following steps to increase ZEPPELIN_LIMIT_INTERPETER_OUTPUT in the Python Interpreter:
  1. From UI: Using Wizard screen

    Go to Interpreters screen in MMG-Studio from Datastudio Options tab.

  2. Once on the interpreters option screen select the Python Interpreter for which we want to configure the zeppelin.limit.interpreter.output.
  3. Select python from the LHS options.
  4. Now scroll down in the RHS side and click on the oracle.datastudio.python.DsPythonInterpreter under Interpreter Client Configurations it will open a popup.
  5. In the popup scroll down and click on + Properties under Properties .
  6. Another popup will open fill the options as shown and set the default value according to your needs if you are not able to see the Create and Cancel button, click on the part of the popup pointed by red arrow. The default value for zeppelin.interpreter.output.limit if not set is 102400 (in bytes).

    Note:

    Increasing the default option from 102400 to some bigger value will slow down the rendering of outputs of python paragraphs.
  7. Once filled click on Create (you will see zeppelin.interpreter.output.limit under the Properties section), then click on Confirm (if you are not able to see the Confirm button on the UI, either click on the same shaded area on popup as highlighted in above image or zoom out in UI of browser) and then click on Update in the lower right side of the screen.
  8. After following all the above steps, restart the MMG-Studio for changes to reflect.
  1. Using JSON screen
    1. Follow the steps i, ii and iii from above, then click on the following icon on UI pointed by red arrow and following json config view will open.
    2. Scroll down under interpreterClientConfigs with className oracle.datastudio.python.DsPythonInterpreter.
    3. After the last entry in properties add the zeppelin.interpreter.output.limit.
    4. After doing the change the Update button will get enabled in the bottom right corner click on it, you will get a message as “python interpreter updated”.
    5. Now restart the MMG-Studio service for changes to reflect.
  2. From filesystem: (Datastudio version 23.4.x onwards)
    1. Go to the Python Interpreter option as pointed out in From UI using wizard screen option above, if you have already ran the MMG services before you will see the python interpreter listed there. Delete it, if you are running the MMG Application for the first time on a fresh schema then you do not need to do this step.
    2. After deleting the Python Interpreter or if start has not been done yet, go to filesystem inside mmg-home/mmg-studio/server/builtin/interpreters, open python.json in a text editor.
    3. Scroll down under interpreter ClientConfigs with className oracle.datastudio.python.DsPythonInterpreter you will find following properties section with bunch of Zeppelin configurations. After the last entry in properties add the Zeppelin Interpreter.output.limit also as shown in step iii) of 1) From UI b) using JSON screen (last image of From UI way). Save the python.json with the desired default value and the changes done.
    4. Now restart/start the MMG-Studio for your changes to reflect.

      Note:

      If you have configured the python environment for MMG-Studio (basically you have installed pandas and numpy which are subset of libraries required by MMG as pre-req), you can run the below script on python paragraph.

      %python

      import pandas as pd

      import numpy as np

      # Create 1000 rows of random data for 20 columns

      data = np.random.randn(1000, 20)

      # Create column names columns = [f"Column_{i+1}" for i in range(20)]

      # Create DataFrame df = pd.DataFrame(data, columns=columns)

      # Display the DataFrame

      z.show(df)

      Output in table view

      Figure A-39 Output in table view

      You can see the ZEPPELIN_INTERPRETER_OUTPUT_LIMIT value as warning if the table content is more than the set default value for zeppelin.interpreter.output.limit and accordingly you can modify the default value for same.