I have the following Groovy transform function on ...
# troubleshooting
f
I have the following Groovy transform function on a column.
Copy code
{
  "columnName": "id",
  "transformFunction": "Groovy('{\"returnType\":\"STRING\", \"isSingleValue\":true}', 'if (arg0.toString() ==~ /[0-9]+/) { return new BigInteger(arg0.toString()).toString() }', _id)"
}
When I POST the table configuration, I end up with an error which says that the function is invalid.
Invalid transform function ...
Can someone help me debug this?
Okay, the following changes, collated from the docs, are required to make the Groovy script work. • Return type metadata JSON is not required. • The column name within the Groovy script must match the column name of the argument. In the example above,
arg0
should be changed to
_id
.