Forum Discussion
SergioTorrinha
2 years agoResolver II
Notebook Resources | Spark not recognized in local machine | File not recognized in local machine
Hi everyone! These questions are related to working with Notebook Resources, see documentation here: https://learn.microsoft.com/en-us/fabric/data-engineering/author-notebook-resource-with-vs-co...
Anonymous
2 years agoNot applicable
Hi SergioTorrinha ,
Thank you for using Fabric Community.
Spark Session is present by default in Fabric Workspace but when working in local you should create it manually.
Please find below code:
import org.apache.spark.sql.SparkSession
val spark = SparkSession.builder()
.master("local[1]")
.appName("SparkByExample")
.getOrCreate()
Spark - Create a SparkSession and SparkContext - Spark By {Examples} (sparkbyexamples.com)
Hope this is helpful. Please let me know incase of further queries.