sc is not created automatically in notebook

点点圈 提交于 2019-12-20 05:25:12

问题


A notebook I created yesterday in DSX has stoped working - errors re can't find the sc object

"NameError: global name 'sc' is not defined"

I restarted the kernel but can't get it created. I have no other kernel running. I created a new notebook - Spark 2.0 with Python 2 and literally nothing in it except:

sc

And that comes back as blank. I am expecting details on my SparkContext object. In case I am going mad I double checked docs and it says it should be automatic:

The SparkContext and SQLContext are created for you as sc and sqlContext respectively

Has something changed or anyone know how I can get the sc created in DSX? Hope I'm missing something obvious. I tried the SparkContext function as per this but get an NPE.


回答1:


This is a glitch in the Spark service your notebook kernel wants to connect to. Please contact DSX support. There is a support button on the bottom right of each page.



来源:https://stackoverflow.com/questions/43409358/sc-is-not-created-automatically-in-notebook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!