dashboardOutput
Overview
dashboardOutput is a pivotal Logic component within the Vantage analytics and data platform, designed to transform and prepare workflow data for consumption within dashboard tiles. This component is instrumental in unwrapping nested data structures, ensuring a flat data array that is essential for accurate pagination and seamless integration into user interfaces. It can handle various input formats, making it versatile and adaptable to different data sources.
Purpose
The primary goal of dashboardOutput is to provide a standardized output format, ensuring that the data consumed by dashboard tiles is structured correctly. By unwrapping complex nested data objects into a flat array, it allows for efficient rendering and interactive elements in dashboards.
Settings
The dashboardOutput Logic does not have traditional configurable settings since it primarily processes incoming data. However, there are specific input parameters and data formats that it expects. Below are the details about the expected input and its handling:
Input Parameters
- Input Name:
inputs.data(or as fallbackinputs.input1)- Input Type: Object
- Description: This is the primary data input which can be passed as an array or a complex object containing nested patterns. The
dashboardOutputwill intelligently unwrap this information to derive a flat array. - Default Value: An undefined value will default to
inputsif other specific fields are absent.
Data Patterns
The dashboardOutput can interpret various nested data object patterns, including but not limited to:
-
Pattern 1:
{ data: [...], metadata: {...} }- The component extracts the data array from the
datakey. Metadata is also captured for further use in displaying supplementary information.
- The component extracts the data array from the
-
Pattern 2:
{ data: { sheets: [...] } }- For multi-sheet scenarios (e.g., data obtained from Google Sheets or other multi-source frameworks), this preserves the integrity of the full data structure while also maintaining the reference to metadata.
-
Pattern 3: Array inputs (
rawDatais already an array)- If
rawDatais detected as an array, it is assumed to be ready for direct usage without any further transformation.
- If
-
Pattern 4:
{ output1: { data: [...] } }- Similar to Pattern 1, but nested under
output1. The data is extracted while metadata is preserved.
- Similar to Pattern 1, but nested under
-
Pattern 5:
{ output1: { data: { sheets: [...] } } }- Again, this represents multi-sheet input scenarios where the data's entire structure is maintained.
How It Works
- The function begins by collecting the primary input data from either
inputs.data,inputs.input1, or a fallback toinputsif neither of the first two are available. - It then checks whether this data is an array. If not, it inspects various common nested formats to extract the required data array.
- Once the appropriate data array is obtained, it outputs an object containing the flat data array (
data) and any associated metadata (metadata), which can then be used in dashboard visualizations.
Data Expectations
The following structures are expected to be passed to dashboardOutput:
- Any object that includes:
- An array under the key
data. - An optional
metadataobject providing additional context about the data.
- An array under the key
- Data can originate from various sources such as exported datasets, workflow outputs, or integrated third-party applications.
AI Integrations
Currently, dashboardOutput does not directly integrate AI functionality. Its primary role is data extraction and structuring. However, it can be used in conjunction with other components that may leverage AI insights, allowing for a more enriched user experience within Vantage.
Billing Impacts
The dashboardOutput component itself does not have a direct billing implication. However, efficient data handling and decreased complexity in data structures can lead to improved performance in data queries and dashboard loading times, which indirectly may affect resource usage and associated costs when deploying larger datasets.
Use Cases & Examples
Use Case 1: Business Analytics Dashboard
A company requires a dashboard to visualize sales data from multiple regions, each represented by different datasets. Using dashboardOutput, they can combine regional data into a flat structure that supports uniform aggregation and visualization.
Use Case 2: Multi-Source Data Integrations
An analytics team is processing data from multiple external sources, including Google Sheets and databases like SQLite. They can utilize dashboardOutput to seamlessly integrate these different data structures into their dashboard for a comprehensive view.
Example Configuration
Scenario: A dashboard needs to visualize sales data extracted from a complex multi-sheet Google Sheets document.
Input Configuration:
{
"data": {
"sheets": [
{"sheetName": "North Sales", "data": [ ... ]},
{"sheetName": "South Sales", "data": [ ... ]}
]
},
"metadata": {
"totalRecords": 100,
"lastUpdated": "2023-10-01"
}
}- In this configuration,
dashboardOutputwill detect the multi-sheet data format and preserve the entire structure, allowing dashboard tiles to visualize each region's data efficiently. The associated metadata can provide additional context for users.