0

I am able to create databricks delta tables using scala and able to perform append and overwrite operations over it.

Is there any way I can perform DELETE and UPDATE operations using scala and not through Databricks runtime.

val target = Seq(
  Data("a", "0"),
  Data("b", "1"),
  Data("c", "2"),
  Data("d", "3")
).toDF().write.format("delta").mode("overwrite").saveAsTable("target")
val DF1 = spark.table("target")
DF1.show()

val NewInserts = Seq(
  Data("a", "0"),
  Data("b", "1"),
  Data("c", "2"),
  Data("d", "3")
).toDF().write.format("delta").mode("append").saveAsTable("target")

val DF2 = spark.table("target")
DF2.show()
Arun
  • 9
  • 1
  • scala is language and Databricks runtime is a library. You can use Databricks runtime using scala as an language. Can you please elaborate more on the question? – DaRkMaN May 29 '19 at 13:53

1 Answers1

0

Not yet! Only sql commands support the update/delete/merge. Databricks is working on releasing the scala/python equivalents.

Joe Widen
  • 2,378
  • 1
  • 15
  • 21