Database Queries
SQL IN Clause Batching
When querying databases with large lists of IDs, you often need to split them into manageable batches to avoid query limits or timeouts.Paste your IDs
Copy your transaction IDs, user IDs, or other identifiers into the input area. One ID per line.
Configure the split
- Set Mode to “Items per batch”
- Set Per Batch to your database’s optimal batch size (typically 200-1000)
- Set Template to “SQL IN”
- Set Output to “Newline”
The SQL IN template automatically adds single quotes and escapes values for SQL safety.
Example Output
API Batch Requests
Rate-Limited Endpoints
Many APIs limit the number of items you can process per request. SplitBox helps you prepare batches that respect these limits.Items per Request
Use Items per batch mode when the API limits the number of items (e.g., “max 100 users per request”).
Payload Size Limits
Use Max chars per batch mode when the API has payload size restrictions (e.g., “max 10KB per request”).
JSON Array Output
For REST APIs expecting JSON arrays:- Set Template to “JSON array”
- Each batch outputs as a properly formatted JSON array:
The JSON array template includes proper escaping for special characters and Unicode.
Data Processing
Parallel Processing Workloads
When distributing work across multiple workers or processes:Calculate worker count
Determine how many parallel workers you want to run (e.g., 4 CPU cores = 4 workers).
Use target batch count
- Set Mode to “Target number of batches”
- Set Batch Count to match your worker count
- SplitBox will distribute items evenly across batches
Character-Limited Systems
Some systems have strict character limits (e.g., SMS, command-line arguments, URL parameters):- Set Mode to “Max chars per batch”
- Set Max Chars to your limit (e.g., 160 for SMS, 2048 for URL parameters)
- SplitBox packs as many items as possible while staying under the limit
Data Cleanup Workflows
Deduplication
Before processing, you can remove duplicates from your list:Case-Sensitive
Dedupe: Case-sensitive treats “ABC” and “abc” as different items.
Case-Insensitive
Dedupe: Case-insensitive treats “ABC” and “abc” as duplicates, keeping only the first occurrence.
Validation and Filtering
Filter out invalid entries before splitting:- Alphanumeric: Keep only items with letters, numbers, underscores, and hyphens (useful for IDs)
- Email: Keep only valid email addresses
- Custom regex: Define your own validation pattern (e.g.,
^[A-Z]{3}\\d{4}$for codes like “ABC1234”)
Invalid items are shown in the preprocessing summary with examples, so you can review what was filtered out.
File Export Scenarios
Bulk Download for Offline Processing
When you need to process batches offline or distribute them to a team:- Configure your split settings
- Click Split to generate batches
- Click Export all ZIP to download:
- Individual files for each batch (
.txt,.sql,.csv, or.jsonbased on template) - A
manifest.jsonfile with metadata about the split
- Individual files for each batch (
Single Batch Operations
For quick operations on individual batches:- Copy: Click the copy icon to copy a batch to your clipboard
- Download: Click the download icon to save that specific batch as a file
File extensions are automatically determined by your output template:
.sql for SQL IN, .json for JSON array, .csv for quoted CSV, and .txt for plain output.Advanced Use Cases
Multi-Stage Processing Pipelines
- Stage 1: Use Validate: Email to filter a customer list to valid emails only
- Stage 2: Use Dedupe: Case-insensitive to remove duplicate entries
- Stage 3: Use Mode: Items per batch with Template: JSON array to create API-ready batches
Mixed Delimiter Input
If you’re not sure how your data is delimited:- Set Parse to “Auto detect”
- SplitBox will intelligently detect whether items are separated by newlines, commas, or tabs
Auto-detect prioritizes newlines first, then tabs, then commas. Each token is trimmed and empty entries are removed.