QueryTile Documentation
Overview
The QueryTile is a powerful component within the Vantage analytics platform, designed to facilitate data searching and retrieval from large datasets. By employing both traditional filtering methods and advanced AI semantic search capabilities, QueryTile allows users to efficiently navigate through extensive data, making it an essential tool for data analysts and business intelligence professionals. The tile incorporates lazy loading capabilities via data references, enhancing performance by loading data incrementally.
Purpose
The purpose of the QueryTile is to:
- Provide a flexible search interface for users to filter and find relevant data within large datasets.
- Support AI-integrated search functionality for improved data discovery and insights.
- Manage pagination and lazy loading of data to maintain performance with large datasets.
- Enable customization and configuration of search parameters through settings.
Settings
The QueryTile comes with several configurable settings that control its behavior and appearance. Here is a detailed description of each setting:
1. title
- Input Type: String
- Description: The main title displayed at the top of the QueryTile. This title identifies the purpose of the tile to the user.
- Default Value:
'Data Search'
2. subtitle
- Input Type: String (optional)
- Description: An optional subtitle that provides additional context about the data or the search function.
- Default Value:
undefined
3. footerText
- Input Type: String (optional)
- Description: Text displayed in the footer of the QueryTile. This can be used to inform users about data source, last updated times, etc.
- Default Value:
undefined
4. footerColor
- Input Type: String (CSS Color)
- Description: The color applied to the footer text. This allows for customization of the appearance to align with branding or user preference.
- Default Value:
undefined
5. data
- Input Type: Array
- Description: The initial dataset to be loaded and searched. This is overridden if a data reference is provided.
- Default Value:
[]
6. dataRefIds
- Input Type: Array
- Description: An array of references to data sources. If specified, these references are used to load data dynamically.
- Default Value:
[]
7. config
- Input Type: Object
- Description: Contains configuration options for the QueryTile. This includes settings related to searchable fields, workflows, and placeholder text.
- Default Value:
{}
7.1 searchableFields
- Input Type: Array
- Description: A whitelist of fields that can be searched by users. This enhances performance and relevance by limiting search targets to specified attributes.
- Default Value:
[]
7.2 workflowId
- Input Type: String
- Description: Identifier for the workflow that is tied to this QueryTile. It allows the tile to operate within a specific context or data pipeline.
- Default Value:
undefined
7.3 workflows
- Input Type: Array of Objects
- Description: A list of possible workflows that can be associated with the QueryTile. Users can switch between the specified workflows depending on their needs.
- Default Value:
[]
7.4 placeholder
- Input Type: String
- Description: The placeholder text displayed in the search input field until the user begins typing. This serves as a prompt to indicate expected user input.
- Default Value:
'Search this dataset...'
8. isLoading
- Input Type: Boolean
- Description: Indicates whether the QueryTile is in the process of loading data. A loading state can trigger visual loaders to inform users.
- Default Value:
false
9. height
- Input Type: Numeric
- Description: Specifies the height of the QueryTile in pixels. Custom height can help align the tile with design specifications.
- Default Value:
undefined
10. width
- Input Type: Numeric
- Description: Specifies the width of the QueryTile in pixels. This allows customization of layout dimensions.
- Default Value:
undefined
How It Works
Data Loading
The QueryTile initially loads a portion of data based on the dataRefIds provided. It employs a pagination system, defined by a constant PAGE_SIZE, which dictates how many records are fetched during each request. The component also supports an "Load All Data" feature which allows users to load the entire data set at once, especially applicable for small datasets.
Search Functionality
The QueryTile leverages both traditional and AI-powered search mechanisms:
- Traditional Search: Users can filter data by specific columns and employ standard query parameters.
- AI Search: An integrated AI engine interprets user queries, providing contextually relevant results while offering enhanced search capabilities beyond matching keywords.
State Management
The QueryTile manages numerous states including search queries, results, sort directions, active filters, and pagination. Persistent storage is used to save user configurations across sessions, allowing for a seamless user experience.
Error Handling and Loading States
The QueryTile incorporates robust error management, displaying relevant messages to users in cases of loading failures or when inputs do not yield results. It also includes visual indicators (like loaders and messages) during data loading operations.
Use Cases & Examples
Use Case 1: Market Research Analysis
A data analyst needs to analyze consumer behavior across different demographics stored in a large dataset. They can utilize the QueryTile to filter data by age, location, and purchasing patterns. Using AI search, they can ask complex questions like "What are the buying habits of consumers aged 20-30 in California?"
Use Case 2: Sales Team Performance Review
Managers in a sales organization can leverage the QueryTile to track sales performance metrics across different teams. By selecting fields related to sales figures and applying grouping functionalities, they can generate reports on team performance at various levels.
Use Case 3: BI Dashboards
Creating dynamic BI dashboards where users can not only view data but also drill down into specific attributes using the QueryTile's filtering capabilities. This can serve for executive summaries where high-level insights can be derived interactively.
Example Configuration
To solve the use case of Market Research Analysis, the QueryTile could be configured as follows:
{
"title": "Consumer Behavior Analysis",
"subtitle": "Explore data trends based on user demographics.",
"footerText": "Data sourced from national surveys.",
"dataRefIds": ["dataRef:consumer_behavior"],
"config": {
"searchableFields": ["Age", "Location", "PurchaseHistory"],
"workflowId": "workflows:1",
"placeholder": "Search demographics..."
},
"isLoading": false,
"height": 400,
"width": 600
}With this configuration, the QueryTile will facilitate focused searches within the consumer behavior dataset while providing a rich interface for data exploration.