Smart Analytics#
Smart Analytics is a transformative capability that empowers users to generate tables from existing datasets or external databases, enabling a multitude of analytics operations. This feature offers more than just table generation – it also allows for the seamless appending of table values to existing tables or the creation of new tables, facilitating streamlined data consolidation and enrichment. By Smart Analytics, users gain the flexibility to create and publish datasets while simultaneously creating, updating or overwriting tables using Smart Analytics queries. This concurrent process enhances the efficiency of data management, ensuring that the most up-to-date information is readily available for analysis and reporting purposes.
The dynamic functionality of Smart Analytics enables users to run algorithms and produce data that can be directly fed into tables, eliminating the need for manual data connections. This capability empowers users to efficiently leverage their data assets, whether it involves creating new tables or updating existing ones.
Data Connection#
Smart Analytics offers versatile ways to obtain data. Users can acquire data through different methods, such as retrieving it from existing datasets within our platform or connecting to their own database for data access.
For an example, let’s retrieve the data from our pre-existing dataset within the ConverSight platform.
Let’s initiate by importing the required library files from the ConverSight Library. It’s important to note that Smart Analytics has its own distinct library within ConverSight.
from conversight import Dataset,Context,SmartAnalytics
# This will import all the necessary libraries
NOTE
The keyboard shortcut Shift + Enter is utilized to execute a cell.
The connection to the dataset is established using the dataset ID and token. The token ID can be obtained from the Content Library, which can be accessed for user and session-related details
ctx=Context()
# ctx object is used to obtain user related session details
NOTE
The keyboard shortcut Shift + Tab is used to view the help guide for a method.
The dataset should be populated with the necessary arguments to enable access to its data.

Arguments for Dataset Access#
ds = Dataset('Dataset_ID',token=ctx.session.token)
The object ‘df’ contains the dataframe obtained by executing a query in the Dataset and saving the result.
df = ds.sqlDf("SQL QUERY")

Dataframe#
Select smart analytics from the ds object.

Smart Analytics#

Smart Analytics#
Available Methods in Smart Analytics#
Pressing the Tab button on an object or function displays a list of the available functions. List of available methods for Smart Analytics are shown in the below screenshot.

Methods in Smart Analytics#
Create#
The create method is employed to generate a new Smart Analytics. Furthermore, it can also be used to update an existing table. If the “isOverwrite” parameter is set to “True,” the method will overwrite an existing table by truncating the current data. Alternatively, if “isOverwrite” is set to “False,” the method will append the new data to the existing data. The required arguments for creating Smart Analytics are provided below.

Create Method#

Smart Analytics Created#
Update#
The update method is used to modify an existing Smart Analytics. If the “isOverwrite” parameter is set to true, it will overwrite the existing table by truncating the current data. Otherwise, it will append the new data to the existing table. The required arguments for updating a Smart Analytics are provided below.

Update Method#
NOTE
When the isOverwrite parameter is set to true, it replaces the data in the table by truncating the old data and loading the new data.

Smart Analytics Updated#
PublishData#
The publishData method allows for the publication of the SME without the need for any manual intervention. It grants the privilege to publish directly from the notebook. This method does not require any arguments.

PublishData Method#

Smart Analytics Published#
Get#
The get method is utilized to list out the Smart Analytics that have been created for the connected dataset. This method does not require any arguments.

Get Method#

List Of Smart Analytics Available#
PublishDataset#
The publishDataset method is utilized to publish the Smart Analytics. The argument for the publishDataset method is used to determine the action to be taken. By default, it is set to update, which updates the dictionary for the specified tables. To publish newly created tables, use create as the argument. The object arguments are used to either publish the specified objects or update the dictionary for the given objects. When creating or updating the Smart Analytics using the create and update methods, if the “isDataPublish” argument is set to “True,” the Smart Analytics will be created or updated accordingly and the changes will be reflected in SME Coaching (Subject Matter Expert) automatically. However, if “isDataPublish” is set to “False,” the created or updated Smart Analytics will be saved in temporary data and will not be reflected in SME unless it is explicitly published using the publishDataset method.

PublishDataset Method#

PublishDataset#
NOTE
The object arguments in publishDataset method can contain multiple unpublished Smart Analytics that can be published simultaneously.
Delete#
The delete method is used to delete Smart Analytics. It takes the name of Smart Analytics as an argument. The isDataPublish parameter is used to determine the type of deletion. If set to False, the raw table will be deleted. If set to True (default), the schema table will be deleted. Deleting the raw data allows for reusing the tables with the existing schema. However, deleting the schema will completely remove the table.

Delete Method#

Smart Analytics Deleted#
NOTE
When a Smart Analytics is created or updated with the "isDataPublish" argument set as "False," it can be deleted using the delete method by setting the "isDataPublish" argument in the delete method as "False" as well.
Smart Analytics empowers users to generate tables from existing datasets or external databases, facilitating various analytics operations. It offers seamless appending of table values, creation of new tables and concurrent dataset creation and table management. This dynamic capability eliminates the need for manual data connections and enhances data management efficiency for analysis and reporting purposes.
Proactive Insights in Notebook#
Proactive Insights entail the proactive pursuit and anticipation of critical information before its immediate relevance, aligning with a strategic approach to problem-solving, data analysis and decision-making. Users can leverage ConverSight to generate, update, delete insights directly within the Jupyter Notebook environment. This streamlined process within a familiar environment offers the flexibility to customize analyses, fostering transparency and reproducibility in data exploration.
Let’s look at how a Proactive Insight can be created in Jupyter Notebook and the various Proactive Insight functions.
To generate and interact with Proactive Insights in the Notebook environment, it is essential to import the ProactiveInsights module from the ConverSight. library.
from conversight import ProactiveInsights
To watch the video, click on Creating Proactive Insights through Notebook.
To watch the video, click on Managing Proactive Insights through Notebook.
Creating Proactive Insights#
Step 1: To commence the creation of insights, begin by accessing the dataset through its datasetID.
Dataset_Variable= "64b50875-qsF_OBj4i"
Step 2: Initiate the ProactiveInsights module by using ProactiveInsights Class.
Insight_object= ProactiveInsights(datasetId=dataset_id)
Step 3: Utilize the Create function provided by the ProactiveInsights library.
Insight_variable.createInsight(domain="Sales",insightName="insights _Creation", data="introduction to proactive insights", order=1,followupQuestion="Number_of_kids, prospect job", roles =["*"], chartType="pie")

Create Insights#
To create a proactive insight, you must provide input arguments such as domain, insightName, data order and more.
Argument |
Description |
---|---|
domain |
To create the insight, input the domain of the dataset. |
insightName |
Provide a name for your Insight. |
data |
Data is essential for the Insight to form a response; without it, the creation of the Insight will not occur. |
order |
Order determines the display sequence of the insight, defaulting to 1. Note that the order cannot be set to zero. |
followupQuestion |
Input a Follow-up Question to address potential inquiries from the insights’ output; necessary for viewing follow-up information. Without provided data, there won’t be any follow-up displayed. |
roles |
To display the insight for a specific secured role, include a list of role IDs. ‘None’ or an empty list of strings is not permissible. |
groups |
To grant access to the insight for a specific secured group, include a list of group IDs. ‘None’ or an empty list of strings is not allowed. |
followUpType |
The default display for follow-up data is in its data form. Adjust the setting to URL if desired. |
thumbnailURL |
The thumbnail URL is used to view the data with a specified name. Default is an empty string (e.g., http://seemydata.com). |
explorerURL |
The Explorer URL, by default, is an empty string and is used to view the data in a separate window. |
businessArea |
By default, the display of data to a particular business group is set to an empty string. |
chartType |
To visualize the data in a specified chart, set the chart type if applicable based on the data. Default is an empty string. |
NOTE
Pressing Shift + Tab will reveal details about the functionalities of the object.
Update Insights#
This function serves the purpose of updating an Insight that already exists within the dataset. It provides the capability to modify and refine the information associated with an insight, ensuring its relevance over time.
Insight_variable.updateInsight(domain="Sales",insightName="Test_insights", insightId="bac3df26-2880-4183-953b-9e2ae133015c", data="update - introduction to proactive insights", order=1, followupQuestion="Number_of_kids, prospect job", roles= ["*"], chartType="")

Update Insights#
Argument |
Description |
---|---|
domain |
Provide the domain name to which the dataset is affiliated. |
insightName |
Provide the name of the Insight you intend to update. |
data |
Data is essential for the Insight to form a response; without it, the creation of the Insight will not occur. |
insightId |
Provide the unique ID of the Insight you intend to update, ensuring the ID is not ‘None’ or an empty string. |
order |
Order determines the display sequence of the insight, defaulting to 1. Notably, the order cannot be set to zero. |
followupQuestion |
Input a Follow-up Question to address potential inquiries from the insights’ output; necessary for viewing follow-up information. Without provided data, there won’t be any follow-up displayed. |
roles |
To display the insight for a specific secured role, include a list of role IDs. ‘None’ or an empty list of strings is not permissible. |
groups |
To grant access to the insight for a specific secured group, include a list of group IDs. ‘None’ or an empty list of strings is not allowed. |
followUpType |
The default display for follow-up data is in its data form. Adjust the setting to URL if desired. |
thumbnailURL |
The thumbnail URL is used to view the data with a specified name. Default is an empty string (e.g., http://seemydata.com). |
explorerURL |
The Explorer URL, by default, is an empty string and is used to view the data in a separate window. |
businessArea |
By default, the display of data to a particular business group is set to an empty string. |
chartType |
To visualize the data in a specified chart, set the chart type if applicable based on the data. Default is an empty string. |
Deleting Insights#
This function enables users to delete an Insight permanently from the dataset.
Insight_variable.deleteInsight(insightName=”your_Insight_Name”)

Delete Insights#
Argument |
Description |
---|---|
Insight Name |
Provide the name of the Insight you intend to delete. |
Viewing Insights#
getInsights()#
This function allows the users to get all the Insights associated with dataset
Insight_variable.getInsight()

Get Insights#
getInsightsAsJson()#
This function allows the users to get all the Insights associated with the dataset in JSON format.
Insight_variable.getInsightsAsJson()

getInsightsAsJson#
getInsightsAndComponentsAsJson()#
The function getInsightsAndComponents enables users to fetch all insights, including their components in JSON format, for a specific dataset. Components embody insights that are limited to a specific group. Depending on the groups and roles assigned to a user, insights components will be generated and notifications will be sent to the user’s associated role group.
Insights_variable.getInsightsAndComponents()

getInsightAndComponent#
getInsightsAndComponents()#
The function getInsightsAndComponents enables users to fetch all insights, including their components in JSON format, for a specific dataset. Components embody insights that are limited to a specific group. Depending on the groups and roles assigned to a user, insights components will be generated and notifications will be sent to the user’s associated role group.
Insights_variable.getInsightsAndComponentsAsJson()

getInsightAndomponentAsJSON#