CDF table partition - Real time Data

JothyGanesan
New Contributor III

Hi team,

We are currently working in loading CDF table using data events from Kafka. The table is going to hold data across geographies. When we tried partitioning it is slowing down the ingestion time. But without partition the downstream application will face slowness. So, what can be done here? Please help

ozaaditya
Databricks Partner

 

1. Instead of using many small partitions (e.g., country or region), opt for larger partitions, such as continent or time-based partitions (e.g., weekly or monthly). This will reduce the number of partitions and improve performance.

2. Write data to a staging table without partitions and periodically merge it into the main partitioned table as needed.

3. Consider using dynamic partition pruning to ensure that only relevant partitions are read during queries.