cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to load a delta table from a dataframe. But its giving me an error.

RahulMukherjee
New Contributor

Code :

from pyspark.sql.functions import *

acDF = spark.read.format('csv').options(header='true', inferschema='true').load("/mnt/rahulmnt/Insurance_Info1.csv");

acDF.write.option("overwriteSchema", "true").format("delta").mode("overwrite").save("/delta/InsuranceInput")

Error :

AnalysisException: 'Incompatible format detected.\n\nYou are trying to write to

/delta/InsuranceInput

using Databricks Delta, but there is no\ntransaction log present. Check the upstream job to make sure that it is writing\nusing format("delta") and that you are trying to write to the table base path.\n\nTo disable this check, SET spark.databricks.delta.formatCheck.enabled=false\nTo learn more about Delta, see https://docs.azuredatabricks.net/delta/index.html\n;'

1 REPLY 1

AbhaKhanna
New Contributor II

1. using Spark SQL Context in python,

scala
notebooks :

sql("SET spark.databricks.delta.formatCheck.enabled=false")

2. In

SQL dbc notebooks
:

SET spark.databricks.delta.formatCheck.enabled=false

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group