JDBCBuildMap Rule

Which IIQ version are you inquiring about?

*8.5
*

Please share any images or screenshots, if relevant.

[Please insert images here, otherwise delete this section]

Please share any other relevant files that may be required (for example, logs).

[Please insert files here, otherwise delete this section]

Share all details about your problem, including any error messages you may have received.

import sailpoint.connector.JDBCConnector;
import java.util.Map;

Map map = JDBCConnector.buildMapFromResultSet(result, schema);

// Read ID safely
String id = (String) map.get(“id”);

// Skip if id is missing
if (id == null || !id.startsWith(“1a”)) {
Map skipmap=new HashMap();
skipmap.put(“id”,“skip_”+id);  // safe skip
return skipmap;
}

// Return map for valid rows
return map;

ERROR: Getting error Index value for[id] on new object was null

I used SQL Query option and Custiomization Rule its working fine but for hands-on purpose I also want to explore the JDBC build map

can you please help on this?

Hi,
In my opinion , When performing JDBC Aggregation in SailPoint IIQ, the Build Map Rule cannot return a partial or incomplete map. IIQ enforces the presence of all required schema attributes for every row returned.

In your application schema, attributes such as the Identity attribute (id) and the Display Attribute are marked as mandatory. Because of this, SailPoint expects every map returned by the Build Map Rule to include these attributes.

Thanks,
RajGopal.

This isn’t true. IIQ does enforce the existence of all attributes that do stuff, though, particularly the native identity and any attributes used to “merge” rows. Your error suggests that your “id” attribute is missing while attempting to merge rows (that’s what it means by index value), though your rule does appear always ensure that it exists.

Note that this is case-sensitive for the JDBC connector.

How do you have it configured in the actual application?

// Skip if id is missing
if (id == null || !id.startsWith(“1a”)) {
return new HashMap();
}

Hi Devin, the above error is getting for this condition
just want to skip or ignore those rows who not match the conditi

Yes, in that code you just pasted now (which is different than the original) you’ll get the error you reported. You do need to return at least the required fields in your Map, and they need to be non-null.

Please share application Schema and share Jdbc query

Ensure your SELECT returns the identity column with the same name as in the schema (use AS id if needed).