Writing to Delta Table with Spark 3 (much easier!)

.writeTo actually creates (lots of overloads available) a delta table in the correct database and location, no parameters are required.

val df = spark.sparkContext.parallelize(Seq(
  (1, "one"),
  (2, "two")
)).toDF("id", "name")

df.writeTo("shared.idname").createOrReplace()

Thanks! You can always email me or use contact form for more questions/comments etc.