title: Inserting Records To Delta Table Through Databricks
body: <p>I wanted to insert 100,000 records into a delta table using databricks. I am trying to insert data by using a simple for loop , something like -</p>
  <pre><code>revision_date = '01/04/2022'
  for i in range( 0 , 100,000):
      spark.sql(&quot;&quot;&quot; insert into db.delta_table_name values ( 'Class1' , '{revision_date}' + i &quot;&quot;&quot;)
  </code></pre>
  <p>The problem is , it takes awfully long to insert data using insert statement in databricks. It took almost 5+ hours to complete this. Can anyone suggest an alternative or a solution for this problem in databricks.</p>
  <p>My Cluster configuration is - 168 GB, 24 core, DBR 9.1 LTS,Spark 3.1.2</p>