blog-post

Apache Superset Integration

Introduction

Manticore Search, a powerful open-source search engine, is known for its versatility and flexibility when it comes to handling large volumes of text data. In our continuous effort to improve the user experience and bring advanced search capabilities to a broader audience, we are excited to announce the integration of Manticore Search in Apache Superset, a leading data exploration and visualization platform.

This integration is available since Manticore Search version 6.2.0 and allows users to harness the full potential of Manticore Search using the default MySQL connector in Apache Superset, simplifying data analysis and empowering users to create stunning visualizations without the need for extensive technical knowledge.

In this article, we’ll provide a step-by-step tutorial that will guide you through connecting Manticore to Apache Superset and adding a chart.

Step-by-step tutorial

Prior to linking Manticore Search with Apache Superset, ensure that Manticore Search has been properly set up and installed on your server. Consult the official Manticore Search guidelines for assistance with installation and configuration procedures.

Step 2: Set up Apache Superset

To set up Apache Superset, follow the official Apache Superset installation guide.

Take notice that currently we support integration with Apache Superset 3.x only! 4.x is not supported yet.

Step 3: Prepare Manticore Search data to visualize

In the next step, you need to prepare and create tables in Manticore Search, then load them with data that will help us generate charts and visualize them using Apache Superset. Connect to Manticore using a MySQL client and execute the following queries:

Here is the structure we will use:

CREATE TABLE product_sales (
id bigint,
product_category text,
sale_date timestamp,
sales_amount float
)

Now, let’s add some data to populate the table:

INSERT INTO product_sales (product_category, sale_date, sales_amount)
VALUES
('Electronics', 1630454400, 1500),
('Fashion', 1630540800, 1200),
('Home & Garden', 1630627200, 900),
('Electronics', 1630713600, 1800),
('Fashion', 1630800000, 1100),
('Home & Garden', 1630886400, 1000);

Step 4: Connecting Manticore Search to Apache Superset

  1. Log in to your Apache Superset dashboard and click on “+” in the top navigation bar and choose “Database Connections”.
    Database connections
  2. Choose “+ DATABASE” to add a new database.
    Add database
  3. Select “MySQL” as the database type.
    Select database connector
  4. In the configuration page, provide the following details:
    • Database Name: A name for the database (e.g., “Manticore”).
    • Fill up “Host”, “Port”, “Username” and “Display Name”
      Connect database settings
  5. Click on “Connect” to verify the connection and save.

Step 5: Creating a Chart and Dashboard

  1. In the Apache Superset dashboard, click on “Dashboards” in the top navigation bar and select “New dashboard.”
  2. Open the dashboard and click on the “+” icon to add a new chart.
  3. Choose the dataset with Manticore Search that connected using the MySQL connector.
  4. Select the type of chart you want to create (e.g., bar chart, line chart, pie chart) from the list of available visualization options. For example, we’ll choose a BAR CHART chart.

Step 6: Configuring the Chart

  1. Use Apache Superset’s query builder or write an SQL query to fetch the data you want to visualize from your Manticore Search database.
    Database chart query
  2. Customize the chart’s appearance, labels, and other settings as needed.
  3. Click on “UPDATE CHART” to update the chart.
  4. Add name of the chart then click “Save” to permanently save the it in Dashboard.

Step 7: Reviewing Your Chart’s Results

Here is a sample of the results obtained using the provided data in the newly configured chart.

Chart result

Conclusion

The integration of Manticore Search in Apache Superset marks a significant milestone in our ongoing commitment to provide users with advanced search capabilities and seamless data visualization experiences. By following this step-by-step tutorial, you can effortlessly connect Manticore Search to Apache Superset using the default MySQL connector and create engaging, insightful charts that showcase the true value of your data.

Don’t miss out on the fantastic opportunities that this powerful combination of Manticore Search and Apache Superset offers. Start exploring your data and unlocking its full potential today!

Read more about Apache Superset Integration in our docs.

Install Manticore Search

Install Manticore Search