Say, for example, you have a web-based dashboard to serve people information, but want an easy way to replace part or all of that dashboard with up-to-date information from external data sources or AI models. In this use case, we replace part of a Tableau dashboard with a UI that is populated with data being pulled at runtime from S3. Because this information will be integrated back into a preexisting Tableau dashboard, AI Squared rendering components might not be suitable to this use case. Therefore, we will use a completely custom rendering step.
Here's the output for this use case, which is a table (denoted my the green arrow) rendered over a preexisting element in a Tableau dashboard:
Harvesting
For this use case, we do not need to harvest any information from the webpage - this is purely pulling information and overlaying it. Therefore, we can leave the Harvesting step empty here.
Analytics
Here we're pulling data from AWS S3, so we'll be using the ReverseML class to point to the data source we want to reverse-ETL into this Tableau visualization.
Pre- and Post-Processing
As this is just an information push from a data source, there is no need to do any pre or post processing of any information being sent to or received from the analytic. Therefore, these steps can be left empty.
Rendering
Because we need to integrate into a preexisting dashboard, the out-of-the-box AI Squared rendering components may not be applicable to this use case. Because of this, we use the custom rendering class in the AI Squared platform editor to allow you to associate Javascript, HTML, and CSS with the information you are integrating. We need to perform this operation in 2 steps.
Create a Rendering Container
The first step is to create a "canvas" to render our custom UI on top of. We use the Container Rendering component to create an iframe within the DOM that we overlay the custom rendering on.
Here we are injecting this container relative to the DOM content, which works well for Tableau or other integrations into dashboards.
Custom Rendering
To create the custom dashboard element, there are input windows for JavaScript, HTML, and CSS within the platform UI.
.verticalTableHeader {writing-mode:vertical-lr;min-width:50px; /* for firefox */transform:rotate(180deg);max-height:100px;text-align:center !important;};#clientData {color:#E15759;font-weight:bold;};table {/* overflow: hidden; add this */table-layout:fixed;width:1119;};
The JS interpreter used by AI Squared is the Sval interpreter (https://github.com/Siubaak/sval), which goes up to ECMAscript 2019. Therefore, it is flexible enough to support all operations you could wish to perform but some expressions (e.g. for each) are not handled and will result in an error.
Feedback
Here we are asking two simple questions of end users, which we handle using Simple Feedback feedback components:
And voila, you're up and running with this use case!