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: 

Enhancement Request: DLT: Infer Schema Logic/Merge Logic

Chris_sh
New Contributor II

Currently when DLT runs it observes NULL values in a column and infers that that column should be a string by default. The next time that table runs numeric values are added and it infers that it is now a numeric column. DLT tries to merge these two columns and errors because the column schemas cannot be merged. 

I understand why the column was set to a string since it had to be set to something and a NULL value could indicate any type of field. This makes sense. The desired behavior should be that when the DLT pipeline runs It sees the schema mismatch and checks the columns. If the persisted column shows all null values and the new column being brought in has values, then the persisted column should be dropped automatically and recreated with the schema from the new column.

Currently without this behavior pipelines will potentially break every time new data is added if the column originally was null prior. 

0 REPLIES 0

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