https://delta.io logo
v

Vladimir Prus

03/08/2023, 7:01 PM
Is it possible to create DeltaTable given a metastore table name. Specifically, I want to delete a partition, and the documentation say I should use
Copy code
import io.delta.tables._

val deltaTable = DeltaTable.forPath(spark, "/tmp/delta/people-10m")

// Declare the predicate by using a SQL-formatted string.
deltaTable.delete("birthDate < '1955-01-01'")
But since Hive Metastore already has a location for a table, I don’t want to repeat myself, and would rather have
Copy code
val deltaTable = DeltaTable.fromMetastore("mart.my_table")
is it possible?
2 Views