Resolve "Data inspection failed. IllegalStateException: Expected DataMap at /Result" in Spectrum

Product Feature: Enterprise Designer

Operating System: Not stated

Database: Not stated

Configuration: Not stated
 

Issue

The following error message occurred when running a dataflow: Data inspection failed. IllegalStateException: Expected DataMap at /Result

Cause

The Splitter stage within the Spectrum Enterprise Designer was not handling the following code written in a Transformer stage correctly:

def edge = new Hashtable();
edge["Vertex1"] = data["Vertex1"];
edge["Vertex2"] =data["Vertex2"];
edge["Weight"] = data["Weight"];

Resolution

UPDATED: October 3, 2017
The Splitter stage can handle DataMaps and primitives (like String). The Transformer stage code should have been written in this way:

def edge = factory.create(); // Create DataMap
edge["Vertex1"] = Integer.parseInt(data["Vertex1"].get(i));
edge["Vertex2"] = Integer.parseInt(data["Vertex2"].get(i));
edge["Weight"] = Double.parseDouble(data["Weight"].get(i));