Configure data source


Add new data source

To add a new data source, you have to click on the Draft a new source + button.

../../_images/draftDataSource.png

Qbo supports many data sources. i.e. On-premise, On the cloud,or file upload. Here we are going to use Excel (File upload) as a data source. If you have an excel file available then use that, if not click here to download excel data. We added a retail sample dataset containing four sheets customer, orders, products, and orderproduct data.

To use Excel data source, go the FILE UPLOAD section after clicking on the Draft a new source + button, select Excel as a data source and give unique Name and Display Name for a data source, click on Next button.

../../_images/fileUpload.png

Upload the excel (.xlsx) file you have, update File meta information if required, and enable Header to identify your attributes, then click on Test connection and proceed button.

../../_images/uploadExcelFile.png

Once you are successfully connected with excel data, select the required table and click on Next button.

../../_images/selectTable.png

Now you have a draft version of your data source is available, you can rename an entity’s name if you want and set the Primary key attributes (you have RowId attribute already set as default primary key attributes remove it and set another attribute as primary key attributes) and Default temporal attribute for an entity, then click on the Save draft and Activate draft button to save your changes.

../../_images/initialQboSetUp.png

Once the draft is activated successfully, you need to reload your data sources to reflect your changes, to reload click on Reload which is present at the right top corner.

../../_images/reloadQboInstance.png

Note

Things to remember before you upload your excel file:

  • Please verify the formats of the columns in Excel. By default, Excel columns are formatted as General, which is interpreted as a String. Please change all numeric columns to Number and time-related columns to Date or Time.

  • Qbo insights will also identify an extra attribute called Row ID which represents the Excel row number. You may delete that attribute if you wish.

Configure Entity Metrics

Select Orders entity and click on Edit button

../../_images/select_entity.png

Path of foreign key relation:

Bring attributes of product and customer entity into order entity so that we can easily ask questions like Top 5 product categories by order count, count of orders by state etc.

1 Go in attribute section of order entity.

2 At the bottom of attributes you will find a text editor to add an attribute.

../../_images/add_an_attribute.png

3 Give a name to attribute that you want to bring in.

../../_images/attribute_name.png

4 click on + button (Right most in the same row).

5 Choose the table and attribute that have to bring in order entity.

Here we have to bring category from product table.

../../_images/path_of_forign_key_attribute.png

6 click on Add relation button.

../../_images/add_relation_button.png

7 Add relation between tables

Since Order and Product table do not have direct relation but Order <–> OrderProduct <–> Product. Hence we first provide relation between Order and OrderProduct then OrderProduct and Product tables.

../../_images/order_and_order_product_relation.png

8 Click on add button to add the relation between order and OrderProduct.

9 Check Reference columns key validation disabled box

10 Now select product table from select table dropdown and click on Add relation button.

../../_images/secondary_relation_table.png

11 Provide relation between OrderProduct and Product table and click on Add relation button

12 Check Reference columns key validation disabled box

../../_images/secondary_relationship.png

13 similarly bring subcategory from product and state, gender, age group from Customer

../../_images/product_subcategory.png ../../_images/customer_state.png ../../_images/customer_gender.png ../../_images/customer_agegroup.png

Named Aggregate:

Count of orders

1 Each order has unique order id. So distinct count of order ids present in data set will provide us value of total orders.

2 Click on Add named aggregate

../../_images/add_named_aggregate.png

3 click on collapsible button Unnamed aggregate

../../_images/unnamed_aggregate.png

4 Provide aggregate phrase as count of orders

5 Use Order id as Aggregated attribute and Distinct count as Aggregation function

6 Provide NLP synonyms. e.g total orders,number of orders,no. of orders, #orders etc

../../_images/count_of_orders.png

7 Click on save button

Revenue

1 Click on Add named aggregate

../../_images/add_named_aggregate.png

2 click on collapsible button Unnamed aggregate

../../_images/unnamed_aggregate.png

3 Provide aggregate phrase as revenue

4 Use AMOUNT as Aggregated attribute and Distinct count as Aggregation function

5 Provide NLP synonyms. e.g total revenue, rev, total sale, sale etc

../../_images/revenue.png

6 Click on save button

Named filter:

for elctronics: We will filter out records correspond to category Electronics

1 Click on Add named filter

../../_images/add_named_filter.png

2 click on collapsible button Unnamed filter

../../_images/unnamed_filter.png

3 Provide filter phrase as for electronics

4 Provide NLP synonyms. e.g with electronics category etc

5 Use following in filter condition:

  1. Filter type - String

  2. Attribute - category

  3. Operator - Equals

  4. Value - Electronics

../../_images/filter_for_eletcronics.png

6 Click on save button

Configure analytics

Variance insights

  1. Go in order entity. Select ANALYTICS tab and click on Variance insights.

    ../../_images/variance_insights.png
  2. Enable variance insights and click on Add new to add behavioral aspects.

    ../../_images/variance_add_aspect.png
  3. Select revenue named aggregate and click on Expand.

    ../../_images/varaiance_expand.png
  4. Click on Add new possible related aspect and add age group, gender, age group, category, subcategory and payment type one by one.

    ../../_images/variance_related_attributes.png
  5. Select order purchase date as date attribute.

    ../../_images/variance_date_attribute.png
  6. Save draft

Click here to know more about variance analysis.

Configure thesaurus

Configure thesaurus to provide synonyms to complex queries.

Give top selling product as synonym to a query What are the top 5 categories of the orders by revenue.

Steps:

1 Go to thesaurus.

../../_images/thesaurus_tab.png

2 Click on New entry.

../../_images/thesaurus_new_entry.png

3 Fill following info:

  • Phrase : What are the top 5 categories of the orders by revenue

  • QuerBotName : qbo

  • Add synonyms : top selling product

../../_images/thesaurus_synonym.png

4 Click on Save changes

Now you don’t need to ask long query. If you ask top selling product then it will point to a canonical query What are the top 5 categories of the orders by revenue.