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

Will Unsetting delta.targetFileSize During Data Load Cause Any Issues?

pooja_bhumandla
New Contributor II

Hi,
If I unset the Spark config delta.targetFileSize (e.g., using alter) while a data load is in progress (batch or streaming), will it cause any issues?

Will the load fail or behave inconsistently due to the config being changed mid-process?

Thanks!

2 REPLIES 2

mani_22
Databricks Employee
Databricks Employee

@pooja_bhumandla  delta.targetFileSize controls the file size for operations including optimise or Z-orderauto compaction, and optimised writes.

Unsetting this config during data load will not cause any failures or behave inconsistently. After unsetting, the above operations will use the default value as the target file sizes.

Brahmareddy
Esteemed Contributor

Hi pooja_bhumandla,

How are you doing today? In general, changing the delta.targetFileSize config while a batch or streaming load is in progress wonโ€™t crash your job, but it may lead to inconsistent behavior during that specific run. Spark jobs usually pick up the config at the start of execution, so if you unset or change it mid-load, only the subsequent operations or triggers might reflect the new setting. This could result in a mix of file sizes being written to Delta, which might not be ideal if youโ€™re aiming for consistent file sizing. So, while it's not likely to fail your job outright, itโ€™s best to change such configurations between loads or restarts to avoid unexpected results. Hope that helps!

Regards,

Brahma