Cannot add SQL query as data source in dashboard designer

Document ID : KB000094277
Last Modified Date : 03/05/2018
Show Technical Document Details
Issue:
When trying to test a SQL query as a data source in Dashboard Designer, it fails with an error similar to the following:

Could not read JSON: null value in entry: TCP=null (through reference chain: com.firehunter.dashboard.controller.TestSQLDataSourceRequestBody ["parameters"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: null value in entry: TCP=null (through reference chain: com.firehunter.dashboard.controller.TestSQLDataSourceRequestBody ["parameters"]) .. 
Environment:
This issue was discovered with UIM/UMP 8.51 and Oracle 12, but the information/resolution discussed in this article is generally applicable to all versions of UIM.
Resolution:
In this case, the user imported a previously made dashboard that contained a global variable called "TCP", which did not have a value. See the error above - TCP=NULL.
Once the variable was removed, the SQL query tested successfully and the data source was able to be added.
Additional Information:
How to assign a data source to a widget - https://www.youtube.com/watch?v=gVmFKdgYeTc

Creating a data source - https://docops.ca.com/ca-unified-infrastructure-management/8-5-1/en/using-ump/the-dashboard-portlet#TheDashboardPortlet-CreateandAssignaDataSource