Using In-Memory Data Source to Expand Reveal's Data Reach
There may be times when you want to directly connect to a data source that Reveal might not support yet out of the box. For instance, you may have your own custom database. To accommodate this need, we support in-memory as a data source. You may also want to use this option if you need […]
There may be times when you want to directly connect to a data source that Reveal might not support yet out of the box. For instance, you may have your own custom database. To accommodate this need, we support in-memory as a data source. You may also want to use this option if you need to use data already in memory as part of your application state, such as the result of a report requested by a user.
In-memory data source also offers other benefits such as retrieval speed as it is much faster to access data in memory than on a disk drive.
In this blog we’ll step through how to use this feature.
Defining a Data Schema
We recommend you define a data file with a schema that matches your in-memory data. Data files can be, for example, a CSV or Excel file, and a schema is basically a list of fields and the data type for each field. In the example below you’ll find details about how to create a data file with a given schema, and then use data in memory instead of getting information from a database.
In the following example, we’ll use in-memory data with the list of employees in the company in order to embed a dashboard showing HR metrics in your HR system. And instead of getting the list of employees from your database, we’ll use the data in memory.
Preparing the Data File and Sample Dashboard
Use the following steps based on a simplified Employee that only has a few properties:
- EmployeeID: string
- Fullname: string
- Wage: numeric
First create the CSV file with the same schema:
- Upload the file to your preferred file sharing system, like Dropbox or Google Drive
- Create a dashboard using the dummy data. Please note that you are going to provide the real production data later in your application
- Export the dashboard (Dashboard Menu → Export → Dashboard) and save as a .rdash file.
Visualizing the Dashboard and Returning the Actual Data
Now you need to visualize the dashboard using your own data instead of the dummy one.
Implement IRVDataSourceProvider and return it as the DataSourceProvider property in IRevealSdkContext, as described in Replacing Data Sources.
Then, in the implementation for the method ChangeVisualizationDataSourceItemAsync, you need to add a code similar to this one:
This way you basically replace all references to CSV files in the dashboard with the in-memory data source identified by “employees”. This identification will be used later when returning the data.
Implement the method that will return the actual data, to do that implement IRVDataProvider as shown below:
Please note that the properties in the Employee class are named exactly as the columns in the CSV file, and the data type is also the same. In case you want to alter the field name, field label and/or data type of any of the properties you can use attributes in the class declaration:
- RVSchemaColumn attribute can be used to alter the field name and/or data type.
- DisplayName attribute can be used to alter the field label
In addition, to implement IRVDataProvider you need to modify your implementation of IRevealSdkContext.DataProvider to return it:
To learn more about Reveal or trial the SDK if you haven’t yet done so, please visit the Reveal webpage.
MORE TOPICSReveal update
caller_get_postsis deprecated. Use
ignore_sticky_postsinstead. in /var/www/html/wp-includes/functions.php on line 5697
Accelerate Insights with Self-Service Embedded Analytics
Why Choose Purpose-Built Embedded Analytics?
Most of today’s embedded analytics solutions are simply iFrames embedded in a Web View in an application. With a purpose-built embedded analytics solution, you get complete control over your own app experience – which features to show and hide, how your dashboards are branded, how security is implemented, and where your app is deployed.
With Reveal as your embedded analytics solution, there is no compromise in features and functionality, all while driving data-driven decisions across your organization.
Top Embedded Analytics Features Your Customers will Love
Simple & Beautiful User Experience
Transform and grow your product with custom dashboards and data visualizations. Gain a competitive advantage by enabling storytelling with data and showcase your business data in context and in real-time by embedding beautiful and interactive data visualizations into your apps.
Match Your Brand Experience
Since Reveal is an embedded BI solution, it needs to match your UX. You have complete API control over how Reveal looks and behaves in your application – fonts, background & foreground colors, visualization colors palettes, and more give you 100% control over your app UX.
Works on Any Platform
This is the magic. On the fly, we transform data from disparate data sources into visual displays that the brain can understand and act on.
President of Atanasoft
SDK Features for Optimal Developer Productivity
Connect to Any Data Source
Dozens of Connectors, including REST, Postgres, JSON, CSV. Excel, SQL Server, Analysis Services, Google Big Query, Azure SQL, Azure Synapse and more.
With Reveal, you are in charge of deployment. Reveal runs on Windows, Linux, or Mac servers, with backend SDKs for .NET, Java and NodeJS. Deploy on-prem, or to any cloud or any container in the cloud!
Secure by Default
Data access is controlled by you. You have complete control over queries, parameters and filters that are sent to your data sources. We have added capabilities to support multi-tenant backends, and row-level filtering for per-user security.
Rich Client & Server API
Every aspect of Reveal is configurable via properties, functions, and events in a rich API in both the client and server SDK’s. With Reveal, you can override every aspect of interactive behavior, how dashboards are loaded and saved, and what UI features are available to users.
What People are Saying About Reveal
Increase customer win rate with Reveal
Powerful software for building effective marketing leads
Director of Communications
Reveal, a platform with ideal tools for any company.
Joshua Andrew M
Amazing Software for Embedding and Using as your data visualization Dashboards
We build powerful leads with Reveal.
Embedded Analytics Video Tutorials
Get started with the resourses you need to create simple and beautiful dashboard
Frequently Asked Questions
Embedded Analytics Blogs
Recent Blogs Posts about Reveal
Read the latest about analytics and visualizations. View more blogs.