MuthuLakshmi
Databricks Employee
Databricks Employee

@Buranapat Can you please try this check as a workaround?
result = spark.sql(insert_statement).first()
if result is not None and 'num_inserted_rows' in result:
          num_inserted_rows = result['num_inserted_rows']
else:
          num_inserted_rows = 0