I've got a query that pulls out OpsGenie oncall status results but am not sure how to craft that into a working SWQL query within the widget. Data is generated via an application monitor that uses powershell to write the data from the api call into the Orion DB but not in a way that shows up when I tried to use the custom table widget.
FYI I am new to DBA work so likely have overlooked the obvious.
Below is the SQL query I used to find the entries I'd made.
SELECT
ccs.ComponentID, de.ComponentStatusID,
de.ColumnSchemaID, de.ColumnType, de.ColumnDisabled, de.ColumnName, de.ColumnLabel,
de.ColumnThresholdWarning, de.ColumnThresholdCritical, de.ColumnThresholdOperator,
de.ColumnComputeBaseline, de.ColumnUseBaseline, de.ColumnWarningFormula, de.ColumnCriticalFormula,
de.ColumnBaselineFrom, de.ColumnBaselineTo, de.ColumnBaselineApplied, de.ColumnBaselineApplyError,
de.ColumnWarningPolls, de.ColumnWarningPollsInterval, de.ColumnCriticalPolls, de.ColumnCriticalPollsInterval,
de.RowNumber, de.AvgNumericData AS NumericData, de.StringData,
de.ErrorCode, ec.ErrorDescription, de.OSErrorCode, de.StatusCode, sc.StatusDescription, de.StatusCodeType, de.ErrorMessage
FROM APM_DynamicEvidence AS de WITH(NOLOCK)
JOIN APM_CurrentComponentStatus AS ccs on ccs.ComponentStatusID = de.ComponentStatusID
LEFT JOIN APM_ErrorCode AS ec ON ec.ID = de.ErrorCode
LEFT JOIN APM_StatusCodeType AS sct ON sct.ID = de.StatusCodeType
LEFT JOIN APM_StatusCode AS sc ON sc.ID = de.StatusCode AND sc.StatusCodeTypeID = de.StatusCodeType
WHERE ccs.ComponentID =