Hello,
This issue occurs because null values in the API response can break schema parsing and lead to SQL/parser errors during metadata creation.
Root Cause
• API response contains fields like:
{
"name": null,
"status": null
}
• Helical Insight may fail to interpret such fields properly during schema generation
• This results in parsing errors like:
syntax error at or near ‘,’
Solution: Use transformResponse Property
Helical Insight provides a property called:
transformResponse
• Default value: false
• When set to true, it allows you to apply custom transformation logic using Groovy
Steps to Fix
-
Enable transformResponse
“transformResponse”: true
-
Add Groovy Script to Handle Null Values
Use the following script to replace all null values with “NA”:
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.ObjectNode
import com.fasterxml.jackson.databind.node.JsonNodeFactory
JsonNode transformResponse(JsonNode data) {
def factory = JsonNodeFactory.instance
if (data.isArray()) {
data.each { element ->
if (element.isObject()) {
element.fieldNames().each { field ->
if (element.get(field).isNull()) {
element.put(field, "NA")
}
}
}
}
}
return data
}

What this does
• Iterates through API response
• Detects fields with null values
• Replaces them with “NA”
• Ensures consistent and parseable data structure
Result
After applying this:
• Connection is created successfully
• Metadata generation works
• Reports can be built without errors
Alternative Approach
• Fix API to avoid nulls (if possible)
• Or replace nulls with default values at source
Further reading (how to connect and use API as a datasource): https://www.helicalinsight.com/connect-and-use-an-api-as-a-data-source-in-helical-insight-5-0/
Thank You,
Helical Insight.