title: Scala Spark - illegal start of definition
body: <p>This is probably a stupid newbie mistake, but I'm getting an error running what I thought was basic Scala code (in a Spark notebook, via Jupyter notebook):</p>
  
  <pre><code>val sampleDF = spark.read.parquet("/data/my_data.parquet")
  
  sampleDF
    .limit(5)
    .write
    .format("jdbc")
    .option("url", "jdbc:sqlserver://sql.example.com;database=my_database")
    .option("dbtable", "my_schema.test_table")
    .option("user", "foo")
    .option("password", "bar")
    .save()
  </code></pre>
  
  <p>The error:</p>
  
  <pre><code>&lt;console&gt;:1: error: illegal start of definition
      .limit(5)
      ^
  </code></pre>
  
  <p>What am I doing wrong?</p>