Skip to main content
When users upload files that contain more columns than are defined in your schema, you might want to access those unmapped columns for additional processing. Dromo provides a straightforward way to capture this data.

Setup Required

1. Enable passthrough in settings

First, enable the passThroughUnmappedColumns setting in your Dromo configuration:
When enabled, each row in your results will include a special $unmapped property containing the unmapped column data.

2. Update your resultsCallback

Modify your results callback to process both mapped and unmapped data:

How It Works

Data Structure

When passThroughUnmappedColumns is enabled:
  • $unmapped property: Added to each row containing unmapped column values
  • Format: { "0": "value1", "2": "value2" } (column index → value)
  • metadata.rawHeaders: Array containing original file headers in order
  • Header mapping: Convert column indexes to actual column names using rawHeaders[index]

Example Walkthrough

Original CSV File

Schema Definition

Let’s say your schema only maps two fields:

Processed Results

With passThroughUnmappedColumns: true, you’ll receive:

Converted Unmapped Data

After processing with header names:

Common Use Cases

Audit Trail

Store unmapped columns for compliance or auditing purposes:

Dynamic Field Processing

Process specific unmapped columns based on their header names:

Flexible Schema Extension

Allow users to map additional fields in a second pass:

Best Practices

Performance Considerations

For large datasets, consider processing unmapped data asynchronously, since you can’t know how many unmapped columns there will be:

Data Validation

Validate unmapped data before processing:
This feature gives you complete flexibility to handle any data structure your users might upload, while maintaining a clean separation between your core schema and additional data capture.