Configure Table Slicing
On this page
Slicing divides the source table into multiple independent chunks of data that can be transferred to the destination in parallel.
XL Ingest provides two approaches to slicing: manual and automatic.
Manual Slicing
Manual slicing provides full control over how the data is divided by allowing the specification of exact values for slice boundaries as a space-separated list.
Understanding Slice Boundaries
In manual slicing, N boundary values create N-1 slices.100 500 1000 create two slices.>= 100 and < 500 and the second slice includes rows with values >= 500 and < 1000.
Required inputs for manual slicing:
-
Slice Column: The column to slice on.
-
Slice Boundaries: Space-separated values that define how to split the data into slices.
To configure and run manual slicing:
-
Navigate to the Table Setup tab in XL Ingest and select the table from the list on the left.
-
In the Table Settings panel, select a column to use for slicing.
-
In the Slices field, enter space-separated boundary values to define slice ranges.
-
Optionally, enter a Where clause to filter rows during extraction.
-
Click Save to apply the configuration.
-
Navigate to the Table Status tab, select the table, and click Sync to begin extraction.
Manual Slicing Example
Consider a table named customers with 10,000 records, where customer_ ranges from 1 to 10,000.customer_ as the slice column.
1 2500 5000 7500 99999This configuration creates 4 slices: >= 1 and < 2500, >= 2500 and < 5000, >= 5000 and < 7500, >= 7500 and < 99999.
The final boundary is set to a high value to ensure that all records are covered.
Automatic Slicing
Automatic slicing analyzes data distribution and calculates optimal boundaries.
The following inputs are required:
-
Slice Column: The column to slice on (e.
g. , customer_,id order_,date last_).name -
Number of Slices: The desired number of slices (e.
g. , 10). -
Prefix(chars): Number of leading digits or characters used to calculate slice boundaries.
To configure and run automatic slicing:
-
Navigate to the Table Setup tab in XL Ingest and select the table from the list on the left.
-
In the Table Settings panel, select a column to use for slicing.
-
Click Auto-Slice in the Define Slices section to open the Auto-Slice dialog.
-
Click Schedule Count to retrieve table statistics from the source (count, max, min, size, time).
-
Enter the desired No.
of Slices (total number of partitions to create). Note: The actual number of slices created in automatic slicing may vary based on your data distribution.
-
Enter Prefix (chars) to control slice boundary granularity.
This value determines how many leading characters or digits are used to group values into slices. -
Review the calculated values including records per slice, slice size, and time per slice.
-
Click Schedule Slice to generate the slices.
-
Navigate to the Table Status tab, select the table, and click Sync to begin extraction.
Automatic Slicing Example
Consider a table named orders with 10,000 records.order_ as the slice column.4 for No.2 for Prefix(chars), then click Schedule Slice.
The system automatically calculates slices based on data distribution and prefix size.
Using SQL on the Source to Compute Slice Boundaries
When using manual slicing, you can calculate boundaries with assistance from the source SQL database.NTILE window function as follows:
Set number_ to the (size of your data / 10GB ) + 1 to create slices of size just under 10GB for large tables.
WITH RankedData AS (SELECTyour_column,NTILE(number_of_buckets) OVER (ORDER BY your_column)AS bucket_numberFROM your_table),BucketBoundaries AS (SELECTbucket_number,MIN(your_column) AS lower_bound,MAX(your_column) AS upper_bound,COUNT(*) AS row_countFROMRankedDataGROUP BYbucket_number)SELECTbb.bucket_number,bb.lower_bound,bb.upper_bound,bb.row_countFROMBucketBoundaries bbORDER BYbb.bucket_number;
Note: If your slice column uses UUID or other data types that do not support MIN/MAX functions directly, cast the column to a string type.
Consider the following table:
CREATE TABLE orderdetails (orderNumber int(11) NOT NULL DEFAULT '0',productCode varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',quantityOrdered int(11) DEFAULT NULL,priceEach decimal(10,2) DEFAULT NULL,orderLineNumber smallint(6) DEFAULT NULL,PRIMARY KEY (orderNumber, productCode));
To calculate 10 slices on orderNumber column, you can run:
WITH RankedData AS (SELECTorderNumber,NTILE(10) OVER (ORDER BY orderNumber) AS bucket_numberFROMorderdetails),BucketBoundaries AS (SELECTbucket_number,MIN(orderNumber) AS lower_bound,MAX(orderNumber) AS upper_boundFROMRankedDataGROUP BYbucket_number)SELECTCONCAT(GROUP_CONCAT(lower_bound ORDER BY bucket_number SEPARATOR ' '),' ',MAX(upper_bound) + 1) AS boundariesFROMBucketBoundaries;
Note: This example uses MySQL syntax.GROUP_ with STRING_.
This query returns a space-separated list of boundaries:
10100 10135 10167 10194 10226 10263 10293 10322 10355 10389 10426The orderNumber column in this example has a minimum value of 10100 and a maximum value of 10425.
Sampling to Speed Up Boundary Calculation
For extremely large tables, you can use sampling on the source database table in SQL to speed up the scan.
Do not use sampling to calculate the minimum and maximum values of the slice column, as this can miss the actual minimum and maximum.
Consult your source database documentation for details on sampling.TABLESAMPLE clause for this purpose.
Last modified: February 12, 2026