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:ย 

Datatype changed while writing in delta format

AnkithP
New Contributor

Hello team,

I'm encountering an issue with my batch processing job. Initially, I write the job in overwrite mode with overwrite schema set to true. However, when I attempt to write the next batch in append mode, it fails due to a change in the datatype of one column. How can I handle this situation when I don't know the datatypes and don't have an external schema to refer to?

1 REPLY 1

Kaniz
Community Manager
Community Manager

Hi @AnkithP

  • When reading data in overwrite mode, use schema inference to automatically detect the column datatypes. Most batch processing frameworks (e.g., Apache Sparkโ„ข, Apache Flink) provide this feature.
  • Store the inferred schema (e.g., as a JSON file) for future reference.
Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!