How do I use a variable defined in the EMR cluster's Python instance when I run code on the managed Jupyter notebook instance using %%local
?
Specifically I want to use matplotlib as shown in this question, and display plot from a dataframe generated using spark.sql()
. Using %%sql
lets me easily use data results in %%local
, but I would still need to pass parameters to %%sql
from the EMR Python instance
Example:
ln[1]: parameter = 'Hello parameter'
ln[2]: %%local
print(parameter)
I keep getting error that my variable is not defined.