Generate AI analysis reports in one click

Updated at:

The AutoReport feature in DataV-Note lets you use natural language to generate an analysis report (AutoReport) with a single click. This significantly reduces data analysis time and manual effort. The feature is currently in beta. This tutorial shows how to use AutoReport to quickly generate an analysis report from a CSV file and an RDS MySQL database.

Tutorial overview

This tutorial provides two scenarios for you to try:

Prerequisites

You have created a project.

Preparations

  • Prepare CSV file data

    Click Apparel Corporate Sales Data to download the sample data to your local machine, and rename the file to Apparel Analysis Data. Upload this file to DataV-Note to perform query and analysis operations.

    Note

    AutoReport currently supports only CSV files with UTF-8 encoding. Ensure that your file uses the correct encoding format. Otherwise, report generation may fail or not function correctly.

  • Prepare MySQL database data

    To query and analyze data from an RDS MySQL database in DataV-Note, you must first add it as an RDS MySQL data source and prepare the data in your RDS MySQL instance.

    1. Create an RDS MySQL instance.

      For this tutorial, create an instance in the China (Shanghai) region and use the automatically created Virtual Private Cloud (VPC) and VSwitch.

    2. In the instance, create the required database account and database, and then prepare the sample data.

      This tutorial uses the following example configuration:

      • Database account: user_test.

      • Database name: mysqldbtest.

      • Sample data: In the mysqldbtest database, create a table named hangzhou_food_map and populate it with data about food in Hangzhou.

      SQL statements

      CREATE TABLE hangzhou_food_map (
          id SERIAL PRIMARY KEY,
          restaurant_name VARCHAR(100) NOT NULL,
          cuisine_type VARCHAR(50),
          location VARCHAR(100),
          rating NUMERIC(2, 1),
          description TEXT
      );
      
      INSERT INTO hangzhou_food_map (restaurant_name, cuisine_type, location, rating, description) VALUES
      ('West Lake Vinegar Fish', 'Hangzhou cuisine', 'By West Lake', 4.8, 'A classic Hangzhou dish with fresh, tender fish.'),
      ('Longjing Shrimp', 'Hangzhou cuisine', 'Longjing Village', 4.7, 'Shrimp cooked with Longjing tea, fresh and fragrant.'),
      ('Dongpo Pork', 'Hangzhou cuisine', 'West Lake District', 4.9, 'A classic signature dish with a glossy color and a soft, sweet taste.'),
      ('Xiaolongbao', 'Jiangnan snacks', 'Wulin Road', 4.5, 'Thin skin, rich filling, and plenty of soup.'),
      ('Scallion Pancake', 'Hangzhou snacks', 'Downtown', 4.0, 'Crispy outside, tender inside, and full of aroma.'),
      ('Osmanthus Lotus Root', 'Hangzhou dessert', 'Xixi Wetland', 4.6, 'Sweet and fragrant, a traditional dessert with a unique texture.'),
      ('Fried Spring Roll', 'Hangzhou snacks', 'Nanshan Road', 4.2, 'Crispy outside and tender inside, popular as an appetizer.'),
      ('Braised Pork', 'Hangzhou cuisine', 'Gongshu District', 4.5, 'Rich but not greasy, a tempting homestyle dish.'),
      ('Fresh Shrimp Wonton', 'Seafood', 'Jiaojiang Road', 4.3, 'Bouncy shrimp filling served with a light broth.'),
      ('Dry Pot Bullfrog', 'Sichuan cuisine', 'Bai Niangzi Scenic Area', 4.6, 'Spicy and flavorful dry pot bullfrog that keeps you coming back.'),
      ('Yuyuan Xiaolongbao', 'Jiangnan snacks', 'Nankaishan', 4.4, 'Crispy xiaolongbao with rich soup that is hard to resist.'),
      ('Hand-grabbed Rice', 'Xinjiang cuisine', 'West Lake Musical Fountain', 4.1, 'Authentic hand-grabbed rice paired with tasty lamb.'),
      ('Hot Pot', 'Hot pot', 'Binjiang District', 4.2, 'Fresh ingredients and spicy broth that is hard to resist.'),
      ('Green Tea Restaurant', 'Hangzhou cuisine', 'West Lake Cultural Square', 4.8, 'A tea-themed restaurant with an elegant atmosphere.'),
      ('Tofu Skin', 'Hangzhou snacks', 'Downtown', 4.0, 'Crispy outside and tender inside, great with sauce.'),
      ('Sweet and Sour Pork Strips', 'Hangzhou cuisine', 'Tonglu', 4.3, 'Balanced sweet-and-sour flavor with tender meat.'),
      ('Shredded Chicken Cold Noodles', 'Cold dish', 'Southern Song Imperial Street', 4.2, 'A refreshing summer dish that is cool and tasty.'),
      ('Huainan Beef Soup', 'Soup', 'Jianggan District', 4.2, 'Tender beef with a rich and flavorful broth.'),
      ('Tiger Skin Green Pepper', 'Homestyle dish', 'Hupao', 4.5, 'A simple but classic homestyle green pepper dish.'),
      ('Bacon Garlic Bread', 'Western cuisine', 'By West Lake', 4.7, 'Savory bacon with garlic bread that whets your appetite.'),
      ('Beef Brisket Noodles', 'Noodles', 'Chang an Road', 4.3, 'Slow-braised brisket that is soft and satisfying.'),
      ('Bracken Stir-fried with Eggs', 'Homestyle dish', 'Gongshu', 4.1, 'A simple bracken and egg stir-fry that is light and delicious.'),
      ('Potstickers', 'Snacks', 'By the Grand Canal', 4.4, 'Crispy on the bottom and tender inside, even better with vinegar.'),
      ('Liangpi', 'Snacks', 'Nanshan Road', 4.2, 'Smooth noodles with a tangy and spicy flavor.'),
      ('Pan-fried Bun', 'Jiangnan snacks', 'Wulin Alley', 4.5, 'Crispy base and juicy filling with savory soup.'),
      ('Stir-fried Rice Cake', 'Snacks', 'Qingzhiwu', 4.3, 'Chewy rice cakes stir-fried with rich toppings.'),
      ('Steamed White Fish', 'Hangzhou cuisine', 'Pujia', 4.7, 'Fresh white fish, lightly steamed for a healthy taste.'),
      ('Clay Pot Rice', 'Rice dish', 'Baisha Road', 4.4, 'Crispy rice crust with rich toppings.'),
      ('Dongpo Tea House', 'Tea house', 'Hubin Pedestrian Street', 4.8, 'A great place that combines tea and food.'),
      ('Peking Duck', 'Beijing cuisine', 'Downtown', 4.0, 'Crispy skin and tender meat, worth a try.'),
      ('Braised Sea Cucumber with Scallion', 'Seafood', 'By West Lake', 4.6, 'Fresh sea cucumber braised with scallions for a full flavor.'),
      ('Sashimi', 'Japanese cuisine', 'Food Street', 4.5, 'Fresh sashimi that pairs well with soy sauce.'),
      ('Egg Dumpling', 'Jiangnan snacks', 'Around West Lake', 4.3, 'Thin, tender egg wrapper with a rich filling.'),
      ('Salted Pork and Vegetable Rice', 'Homestyle dish', 'Shanxi Road', 4.1, 'A perfect match of salted pork and vegetable rice.'),
      ('Sweet and Sour Fish', 'Hangzhou cuisine', 'Xixi', 4.4, 'A classic Hangzhou dish with a sweet-and-sour taste.'),
      ('Purple Sweet Potato Cake', 'Dessert', 'By West Lake', 4.2, 'Made from purple sweet potato with a delicate texture.'),
      ('Green Pepper Beef', 'Homestyle dish', 'Bai Niangzi Scenic Area', 4.5, 'Tender beef with crisp green peppers, very satisfying.'),
      ('Tofu Pudding', 'Snacks', 'Nanshan', 4.2, 'Smooth and tasty, especially good with sauce.'),
      ('Garlic Sauce Pork Slices', 'Snacks', 'Wulin Square', 4.3, 'Light and refreshing, great for summer.'),
      ('Ribs', 'Barbecue', 'Binjiang', 4.7, 'Crispy outside, tender inside, and full of flavor.'),
      ('Stir-fried Rice Noodles', 'Snacks', 'By West Lake', 4.1, 'Hot stir-fried rice noodles with rich toppings.'),
      ('Poached Sliced Pork in Chili Broth', 'Sichuan cuisine', 'Jianggan', 4.5, 'Numbing and spicy sliced pork that is unforgettable.');
      SELECT * FROM hangzhou_food_map;
    3. Configure a whitelist

      To allow the RDS MySQL data source to access your RDS MySQL instance, you must add the DataV-Note system IP addresses to the instance's whitelist.

      The database in this tutorial is deployed in the China (Shanghai) region and uses a VPC. The IP address ranges to add to the whitelist are 47.100.91.0/24 and 100.104.170.128/26.

      Note
      • You can find the IP addresses for the whitelist on the Add an RDS MySQL data source page in the DataV-Note Console.

      • For instructions on how to add IPs to a whitelist, see Set an IP address whitelist.

    You can also configure the instance and database as needed.

Go to the project editing page

  1. Log on to the DataV-Note Console.

  2. On the All Projects > All tab, hover over the target project and click Edit to open the project for editing.

Scenario 1: Analyze data from a CSV file

In this scenario, you will upload the apparel analysis data to DataV-Note and use the AutoReport feature with a natural language query to view sales rankings by residential area and generate an analysis report.

  1. Upload CSV file data

    In the project editing page, on the Datasets tab in the left-side pane, click the image icon next to File Dataset. Follow the on-screen instructions to upload the prepared Apparel Analysis Data file.

    Note

    For more information about importing file data, see Use raw datasets.

  2. Create an intelligent analysis unit

    In the report editing area, click AutoReport to create an Intelligent Analysis Unit.

  3. Analyze the data

    In the Intelligent Analysis Unit, select the data to analyze and enter a query. For this example, select the file dataset Apparel Analysis Data.csv and enter "View sales rankings by residential area".

    Note

    Currently, the Intelligent Analysis Unit supports analyzing only a single data table. The analysis may take 3 to 5 minutes to complete.

    image

    The system automatically performs a multi-dimensional analysis of your query (for example, generating corresponding tables, charts, and project information). After the analysis is complete, click Keep Results to generate the analysis report.image

  4. Preview and publish the report

    After the analysis report is generated, click Preview & Publish in the upper-right corner of the project editing page. You can configure publishing options or get a report link to share. For more information about publishing, see Preview and publish a report.image

Scenario 2: Analyze RDS MySQL data

In this scenario, you create an RDS MySQL data source to access Hangzhou food data from an RDS MySQL database. You then use an AutoReport natural language query to find food items with a rating greater than 4.5 and generate an analysis report.

  1. Add an RDS MySQL data source

    Note

    You can find the configuration information for the data source in the RDS MySQL database that you created during the preparation stage.

  2. Create an intelligent analysis unit

    In the report editing area, click AutoReport to create an Intelligent Analysis Unit.

  3. Analyze the data

    In the Intelligent Analysis Unit, select the data to analyze and enter a query. For this example, select the hangzhou_food_map table and enter "Find food items with a rating greater than 4.5".

    Note

    Currently, the Intelligent Analysis Unit supports analyzing only a single data table. The analysis may take 3 to 5 minutes to complete.

    image

    The system automatically performs a multi-dimensional analysis of your query (for example, generating corresponding tables, charts, and project information). After the analysis is complete, click Keep Results to generate the analysis report.image

  4. Preview and publish the report

    After the analysis report is generated, click Preview & Publish in the upper-right corner of the project editing page. You can configure publishing options or get a report link to share. For more information about publishing, see Preview and publish a report.image

Related documentation

  • For more information about analysis units like SQL Analysis, Python Analysis, Visualization Analysis, and Text Analysis, see Supported analysis unit types.

  • For more information about data sources, see Add a data source.

  • For an overview of core operations, see Operation guide.

  • For more use cases, see Apparel Corporate Sales Analysis Case Study.