Forum Discussion
Error/warnings during Delta table write in Spark Fabric Notebooks
- Anonymous1 year ago
Hi aa_tsl,
Thank you for reaching out in Microsoft Community Forum.
The long execution time is likely due to Spark job overhead in Fabric's F2 SKU, especially when using .collect() on small datasets. Even simple operations can feel slow because of cluster orchestration time, not computation itself.
Please follow below steps to resolve the issue;
1.Replace .collect() with .toPandas() for small datasets to reduce overhead.
2.Keep transformations within Spark as long as possible (avoid switching to Python lists too early).
3.For <2000 rows, consider using Pandas instead of Spark — it’s faster for small data.
4.Fabric's F2 SKU has higher latency for small jobs; if possible, test on F4 for better responsiveness.
Please continue using Microsoft Community Forum.
If this post helpes in resolve your issue, kindly consider marking it as "Accept as Solution" and give it a 'Kudos' to help others find it more easily.
Regards,
Pavan.
Hi aa_tsl ,
Please check the following Spark Configurations
1. Ensure to use latest runtime (1.3 Spark 3.5 and Delta 3.2)
2. Enable Native Execution Engine
3. Check your spark resource profile configs
Ref - https://learn.microsoft.com/en-us/fabric/data-engineering/configure-resource-profile-configurations
Based on the observation , if you write to warehouse it is comparatively slower than writing to Lakehouse. Lakehouse is faster in loading the data using spark with config profiles.
Regards,
Srisakthi