How to instantiate Databricks spark context in a python script?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2023 02:14 PM
I want to run a block of code in a script and not in a notebook on databricks, however I cannot properly instantiate the spark context without some error.
I have tried ` SparkContext.getOrCreate()`, but this does not work.
Is there a simple way to do this I am missing?
Labels:
- Labels:
-
Sparkcontext