Decision Insight 20200928 Save PDF Selected topic Selected topic and subtopics All content Inside a Query Result Overview TabularResult The TabularResult contains a List<Map<String, TabularResultInputValue>>. The List object contains the list of rows and the Map objects contain each row with the String key as the input name. The input name is the equivalent of a column name for a standard SQL query. The following tables describes how to access the information of a TabularResult Information Syntax rows body.rows Accessing the Cell of a Row For a given row, its cells can be accessed using the name of the input present in the query. e.g. if there were an input named successCurrentDayCount in the query we could access its value in the second row of the results using the following syntax : body.rows[1][successCurrentDayCount] TabularResultInputValue A TabularResultInputValue has the following information: values : The values returned by the query Depending on the time range of the inputs being queried the information can be accessed differently. The following sections examine each case separately. Data queried at an instant In the case where the values are queried at an instant, there will only be one result per input. This result will be a Value object If the query asked for all temporal data, the result will be an EnrichedValue Data queried over an interval In the case where the values are queried over an interval, there will be many results returned per cell. Each cell will expose the following information: values : The list of Value instances returned by the query If the query requests all temporal data, the result will contain a list of EnrichedValue The following table summarizes the information available and how to access it in a Camel route: Information Syntax List of Value objects body.values Value For each value, the following information is made available: value : The value returned by the query The following table summarizes the information available and how to access it in a Camel route: Information Syntax Comment Value body.value Only available if the input being queried has a single IndicatorData Value by indicatorData body.valueByIndicatorDataName[<name of IndicatorData>] Always present EnrichedValue When a query requests all available temporal data, the returned object will be a EnrichedValue which has the following information: value: The value returned by the query valid time interval: The time interval for which the value is valid. The interval is a ReadableInterval knowledge time: The time at which the value is known. The knowledge time is a ReadableInstant The following table summarizes the information available and how to access it in a Camel route: Information Syntax Comment Value body.value Only available if the input being queried has a single IndicatorData Value by indicatorData body.valueByIndicatorDataName[<name of IndicatorData>] Always present Valid time interval body.validTime A ReadableInterval Knowledge time body.knowledgeTime A ReadableInstant the interval start and end can be accessed using body.validTime.start and body.validTime.end Related Links
Inside a Query Result Overview TabularResult The TabularResult contains a List<Map<String, TabularResultInputValue>>. The List object contains the list of rows and the Map objects contain each row with the String key as the input name. The input name is the equivalent of a column name for a standard SQL query. The following tables describes how to access the information of a TabularResult Information Syntax rows body.rows Accessing the Cell of a Row For a given row, its cells can be accessed using the name of the input present in the query. e.g. if there were an input named successCurrentDayCount in the query we could access its value in the second row of the results using the following syntax : body.rows[1][successCurrentDayCount] TabularResultInputValue A TabularResultInputValue has the following information: values : The values returned by the query Depending on the time range of the inputs being queried the information can be accessed differently. The following sections examine each case separately. Data queried at an instant In the case where the values are queried at an instant, there will only be one result per input. This result will be a Value object If the query asked for all temporal data, the result will be an EnrichedValue Data queried over an interval In the case where the values are queried over an interval, there will be many results returned per cell. Each cell will expose the following information: values : The list of Value instances returned by the query If the query requests all temporal data, the result will contain a list of EnrichedValue The following table summarizes the information available and how to access it in a Camel route: Information Syntax List of Value objects body.values Value For each value, the following information is made available: value : The value returned by the query The following table summarizes the information available and how to access it in a Camel route: Information Syntax Comment Value body.value Only available if the input being queried has a single IndicatorData Value by indicatorData body.valueByIndicatorDataName[<name of IndicatorData>] Always present EnrichedValue When a query requests all available temporal data, the returned object will be a EnrichedValue which has the following information: value: The value returned by the query valid time interval: The time interval for which the value is valid. The interval is a ReadableInterval knowledge time: The time at which the value is known. The knowledge time is a ReadableInstant The following table summarizes the information available and how to access it in a Camel route: Information Syntax Comment Value body.value Only available if the input being queried has a single IndicatorData Value by indicatorData body.valueByIndicatorDataName[<name of IndicatorData>] Always present Valid time interval body.validTime A ReadableInterval Knowledge time body.knowledgeTime A ReadableInstant the interval start and end can be accessed using body.validTime.start and body.validTime.end