Buildmap Delimited File

Trying to create a buildmap for a delimited file source. In the file, there is a column where the header is blank. I’m trying to copy the data from the column with the blank header to Type column then remove the blank header column but i’m getting the error.

  • Column: “[null]” is unknown and/or column: “” is missing

This is the builmap I’m using. Any suggestions on how to handle this? Not sure if buildmap is the right path for this or if I should modify the file prior to uploading to Sailpoint

import sailpoint.connector.DelimitedFileConnector;

Map map = DelimitedFileConnector.defaultBuildMap(cols, record);

// Identify the blank header column (assuming it's the last column)
String blankColumnData = (String) map.get(""); // Empty string key represents the blank column

// Copy blank column data to "Type" and remove the blank column
if (blankColumnData != null && !blankColumnData.isEmpty()) {
    map.put("Type", blankColumnData);
    map.remove(""); // Remove the last column from the map
}

return map;

A simple fix is to adjust your buildMap script to use map.get(null) rather than map.get(""). This should work if the column header is truly blank or null in the parsed data. Here’s the updated code:

import sailpoint.connector.DelimitedFileConnector;

Map map = DelimitedFileConnector.defaultBuildMap(cols, record);

// Access the blank header column using null as the key
String blankColumnData = (String) map.get(null);

if (blankColumnData != null && !blankColumnData.isEmpty()) {
    map.put("Type", blankColumnData);
    map.remove(null); // Remove the blank column
}

return map;

However, when aggregating this data into ISC, you’ll need to ensure the schema aligns with your target application. The blank header column might not map cleanly to ISC’s expected attributes. To handle this properly:

  • Download the Schema: Go to your delimited file source in ISC, download the existing schema.
  • Adjust the CSV: Preprocess your CSV data according to the downloaded schema headers, then upload it for aggregation.

Thanks for the response. @kalyan_dev32

Tried your buildmap and it is still failing. With error

  • Column: “[null]” is unknown and/or column: “” is missing

The column with the blank header is the last column. Does that make a difference?

No, the issue seems to be that ISC expects all the columns in the first row of your CSV to match the exact positions as defined in the account schema. However, in your case they’re missing that could be causing additional problems. which might not align with what ISC is expecting. Your CSV file headers need to be in the same order and format as the schema requires. My suggestion is to fix the CSV headers to match the expected schema exactly, then upload/aggregate the CSV again.

Thanks @kalyan_dev32

Makes sense. I’ll modify prior to importing to ISC. Appreciate the responses!.

@SailAway Glad that helps! Please mark this as a solution so others in the same boat can find it easily. Thanks!