title: check if delta table exists on a path or not in databricks
body: <p>I need to delete certain data from a delta-lake table before I load it. I am able to delete the data from delta table if it exists but it fails when the table does not exist.</p>
  <p><strong>Databricks scala code below</strong></p>
  <pre class="lang-scala prettyprint-override"><code>// create delete statement
  val del_ID = &quot;Check_ID =&quot; + &quot;123&quot;
  
  // get delta table from path where data exists
  val deltaTable = DeltaTable.forPath(spark, path)
  
  // delete data from delta table
  deltaTable.delete(del_ID)
  </code></pre>
  <p>The above code works only if the delta data exists on that path otherwise it fails.</p>
  <p><strong>Can someone share an approach where the delete statement is executed if the delta data exists else the delete statement is ignored ?</strong></p>