You are designing a solution to store streaming data from multiple sources into Azure Data Lake Storage Gen2. The data must be organized by ingestion time and source system. Each source system produces data in a different format: CSV, JSON, and Parquet. The solution must allow efficient querying using Azure Synapse Serverless SQL and must support partitioning on ingestion date. What is the recommended folder structure?
Trap 1: /data/{date}/{source_system}/ (e.g., /data/2023-01-01/SourceA/)
Date-first may lead to many small partitions across sources.
Trap 2: /data/{source_system}/ with files named…
No date partitioning, leading to poor query performance.
Trap 3: /data/{source_system}/{year}/{month}/{day}/ (e.g.,…
It adds unnecessary folder depth for year/month/day. Azure Synapse Serverless SQL treats each folder level as a separate partition key, so a single date folder (e.g., /data/SourceA/2023-01-01/) is sufficient for efficient pruning on ingestion date. The extra hierarchy in D adds complexity without performance benefit and does not align with the recommended Hive-style partitioning for optimal query performance.
- A
/data/{date}/{source_system}/ (e.g., /data/2023-01-01/SourceA/)
Why wrong: Date-first may lead to many small partitions across sources.
- B
/data/{source_system}/{date}/ (e.g., /data/SourceA/2023-01-01/)
This structure separates sources and dates, enabling efficient query pruning.
- C
/data/{source_system}/ with files named {timestamp}.csv/.json/.parquet
Why wrong: No date partitioning, leading to poor query performance.
- D
/data/{source_system}/{year}/{month}/{day}/ (e.g., /data/SourceA/2023/01/01/)
Why wrong: It adds unnecessary folder depth for year/month/day. Azure Synapse Serverless SQL treats each folder level as a separate partition key, so a single date folder (e.g., /data/SourceA/2023-01-01/) is sufficient for efficient pruning on ingestion date. The extra hierarchy in D adds complexity without performance benefit and does not align with the recommended Hive-style partitioning for optimal query performance.