Using the Insights component

Modified on Mon, 14 Apr at 1:55 PM

Try it!



Use the inmydata-insights component to display a list of insights in to your data, alerting users to signifanct changes in your data and insights in to the performance of your assets.  You may limit the insights to a subject, particular dimensions and metrics, and/or filter down to particular search terms of interest.


You may embed the Insights component like so:

<inmydata-insights tenant="example" subject="Store Sales"/>

Attributes (all are optional):

  • None:  display all available insights
  • subject: limit the insights to this subject
  • filter: Search terms to add to the Search box and apply a filter to the list
  • dimensions: names of one or more dimensions to limit the Insights to, separated by commas
  • metricsnames of one or more metrics to limit the Insights to, separated by commas


To specify a dimension that is a special 'Calendar' field, e.g. Date - Month, supply the field name and date function, separated by a colon, e.g.: Date:Month


Nb. You must use the name of the field as defined in the subject, not any label or caption that is defined for display purposes.  Likewise, it is the name of the calendar date function, not any custom labels defined for these.  Valid calendar date functions are:

  •       Year,
  •       Month,
  •       Quarter,
  •       Week,
  •       Weekday,
  •       YearMonth,
  •       Hour,
  •       Minute,
  •       Second,
  •       Date,
  •       DateHour,
  •       DateMinute,
  •       DateSecond


Events


The following events are emitted by the Insights page, named "inmydata.insights.<event>"

  • selected: a user has selected an inisght in the list


Events have the following arguments (see Getting Started for common attributes):

  • subject: the subject (data source) relevant to the Insight
  • id: the unique identifier of the insight
  • signaturea hash of the Insight details used to file the insight 
  • question: a question to pass to the Copilot in order to "Explain this Insight"


The event data will be formatted like so, with an event name, and arguments expressed in JSON (common attributes omitted for brevity):

inmydata.insights.selected: {
    'subject': 'Store Sales',
    'id': '123456789',
    signature: 'abcdefgh'.
    question: 'what are the top 5 sales by sales value?',
    ...
}


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article