cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.