cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

Update a part of parquet partition is deleting existing data.

JGAICT
New Contributor

I have 4 months of data and I partitioned it on Year and Month column, so my parquet partition looks like 

JGAICT_1-1688364696457.jpeg

JGAICT_0-1688364651334.png

JGAICT_2-1688364739675.png

Data is present inside each monthly partition folder in parquet format.

Then I loaded data for July and also modified some values in August. After generating the required data, I tried to save the output with same partition (Year,Month) as before this time the data did not have September, October and November entries but only for 2 months. The result is as

JGAICT_3-1688365438030.png

JGAICT_4-1688365625614.png

Interestingly when I look unto the month of September, the parquet files are missing, same in October and November. The folders have some modifications based on last modified.

JGAICT_6-1688365838569.png

JGAICT_5-1688365699622.png

I am guessing that the files had gone missing because the 2nd write had overridden the 1st one because the partition was also on year. Is there a way to overcome this problem and avoid files to be deleted?

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