Microsoft Azure Data Lake Storage Gen2 Connector > Mappings for Microsoft Azure Data Lake Storage Gen2 > Directory-level partitioning
  

Directory-level partitioning

You can read from and write to partition columns when you create a mapping in advanced mode.
You can organize tables or data sets into partitions for grouping same type of data together based on a column or partition key. You can select one or more partition columns in a table or data set.
To read from partition columns, select a partition directory and identify the partition columns. To write to partition columns, you can add partition columns from the list of fields and change the partition order, if required.
You can read data from or write data to partition columns for the following file formats:

Reading from partition columns

Perform the following steps to read data from partition columns:
  1. 1Select a directory from the list of source objects. The image shows the list of source objects
  2. 2Select the Source Type as Directory in the Advanced Source Properties.
  3. The image shows the directory source types in the advanced source properties
  4. 3In the Fields tab, you can view the number of partitions.
  5. The partitionOrder column indicates whether a column is partitioned and the order in which the fields are selected for partitioning.
  6. The image shows the partition order for the fields
  7. In the above image, 2 partition columns are present. The partition order values 1 and 2 signify the order in which the Country and State fields were selected for partitioning. The FileName field has 0 as the partition order.

Writing to partition columns

Perform the following steps to write to partition columns:
  1. 1In the Partitions tab, click Add to add the partition columns for a target. The image shows the Add option to add the partition columns for a target
  2. 2Select the partitioning fields from the list of available fields.
  3. The image shows the list of fields available for partitioning
  4. 3Click Select.
  5. The Partitions tab shows the partition columns that you select.
  6. The image shows the list of partition columns
  7. You can change the partition order using the up and down arrows as shown in the following image:
  8. The image shows the up and down arrows that you can use to change the partition order

Rules and guidelines for reading from and writing to a partition folder

Consider the following rules and guidelines when you read from and write to a partition folder for mappings in advanced mode: