Updated on 2025-04-28 GMT+08:00

HTTP Connector Datasets

Prerequisites

The data source to be connected has been created. For details, see HTTP Connector Data Sources.

Creating a Dataset from HTTP Connector

  1. Log in to Huawei Cloud Astro Canvas by referring to Logging In to Huawei Cloud Astro Canvas.
  2. Choose Data Center from the main menu.
  3. Choose Datasets > All in the navigation pane.
  4. On the Dataset Management page, click Create.
  5. Set the dataset name, specify the data type, data source, and folder, and click Save.

    Figure 1 Creating an HTTP dataset
    • Dataset Name: A dataset is identified by its name. The name contains 1 to 60 characters, including letters, digits, and underscores (_).
    • Data Type: Select HTTP Connector.
    • Data Source: Select the data source created in HTTP Connector Data Sources.
    • Folder: Set the folder for storing the dataset. You can select the folder created in (Optional) Creating a Folder or click New Folder.
    • Owner: Creator of the dataset.
    • Description: Description of the new dataset, which is usually the function of the dataset.

  6. Configure dataset parameters.

    • Action: defined when an HTTP Connector is created.
    • Parameter: defined by the execution action in the connector. If the field type is expression, you can click the field value to access the expression setting page. On the displayed page, you can select a field or function from the left pane, or enter a custom function, as shown in Figure 2.
      Figure 2 Setting expressions
    • Test API: API testing. After you click Test API, the output is displayed in the sample packet area.
    • Sample packet: Sample response packet of the API. The metadata structure of the dataset is determined by the data structure of the sample response packet after the packet is processed by the transformer.

      Click Format to format the sample packet.

    • Converter: Click Create to create a converter, or select a preset converter or the converter created in Creating a Converter to convert data.

  7. Click Save. The dataset is created.

Using the Dataset in Widgets

  1. Return to the Projects page.
  2. Go to the canvas page and drag required widgets (for example, horizontal bar chart) to the canvas.

    Figure 3 Dragging a horizontal bar chart widget to the canvas

  3. Select the widget and click .
  4. Select Dataset from the Data Type drop-down list and select the dataset created in section Creating a Dataset from HTTP Connector.
  5. Set global variables.

    Global variables can be regarded as parameter variables and used to control parameter transfer between widgets for interactions such as diagram and table association and field customization.

  6. In Widget Preview, select the form fields to be displayed by dragging them from the left column to the right column, and click Save.

    Figure 4 Dragging a field to the axis
    • Form field: Data recorded in Creating a Dataset from HTTP Connector.
    • Configuration: Drag the required fields from the form field area to the X-axis data, Y-axis data, and series.
    • Refresh cycle: Interval for obtaining data from the HTTP connector. Default is 0, meaning the data is obtained only once.
    • Data sharing: When enabled, multiple widgets calling the same bridge URL request will share the result data.

  7. Select the horizontal basic bar chart widget, click , and set the title to "Function Operation Frequency Statistics".
  8. Click in the upper part of the page to save the settings.
  9. Click to preview.