title: Why does Spark fail with "value rdf is not a member of org.apache.spark.sql.SparkSession"?
body: <p>I am trying to use <a href="https://github.com/SANSA-Stack/SANSA-RDF" rel="nofollow noreferrer">SANSA-RDF</a> for reading turtle RDF files into Spark and create a graph. I am getting an error when I execute the following code. What am I missing?</p>
  
  <pre><code>    import org.apache.jena.query.QueryFactory
      import org.apache.jena.riot.Lang
      import org.apache.spark.sql.SparkSession
      import net.sansa_stack.rdf.spark.io.rdf._
      import net.sansa_stack.rdf.spark.io._
      import scala.io.Source
  
      object SparkExecutor {
        private var ss:SparkSession = null
  
        def ConfigureSpark(): Unit ={
  
          ss = SparkSession.builder
            .master("local[*]")
            .config("spark.driver.cores", 1)
            .appName("LAM")
            .getOrCreate()
  
        }
  
        def createGraph(): Unit ={
          val filename = "xyz.ttl"
          print("Loading graph from file"+ filename)
          val lang = Lang.TTL
          val triples = ss.rdf(lang)(filename)
          val graph = LoadGraph(triples)    
        }
      }
  </code></pre>
  
  <p>I am calling the SparkExecutor from main function using</p>
  
  <pre><code>    object main {
        def main(args: Array[String]): Unit = {
          SparkExecutor.ConfigureSpark()
          val RDFGraph = SparkExecutor.createGraph()
        }
      }
  </code></pre>
  
  <p>This results in the following error</p>
  
  <pre><code>    Error: value rdf is not a member of org.apache.spark.sql.SparkSession
  val triples = ss.rdf(lang)
  </code></pre>