Other Data Sources
When configuring widget data, you can directly create data sources such as relational databases, ROMA connectors, DLI, DWS, Huawei Cloud Astro Zero, Huawei Cloud Astro Zero APIs, HTTP connectors, and Prometheus.
Scenario
Before using the data sources configured in Datasets, first create various types of data sources in the data center. This process involves multiple page jumps. To simplify, you can directly create and use various data sources.
The parameters for creating a data source are the same as those configured in Data Center. This section uses Huawei Cloud Astro Zero API as an example.
Other Data Sources
- Log in to Huawei Cloud Astro Canvas by referring to Logging In to Huawei Cloud Astro Canvas.
- On the editing page, select a widget and click
above the widget.
Figure 1 Clicking the data icon above the basic pie chart - Select AstroZero API for Data Type and click Create on the right.
- Set data source parameters.
Figure 2 Creating a data source
- Name: The name of the new data source, used for identification. The name can contain 1 to 32 characters, including letters, digits, and underscores (_), but cannot start or end with an underscore (_).
- Domain name: Domain name of the Huawei Cloud Astro Zero environment. The value must contain https://.
- Client ID: Configure the client ID for OAuth authentication in the client credentials before calling the Huawei Cloud Astro Zero APIs. During OAuth authentication, set the authorization type to client credential when creating an authentication key. You are advised to select a user with System Administrator Profile.
- Client secret: Configure the client secret for OAuth authentication in the client credentials before calling the Huawei Cloud Astro Zero APIs.
- Description: A description of the data source to be created. This parameter is optional.
- Click Test. If the connection is successful, the data source is ready to use.
- Click Save.
- Select the Data Configuration node on the left and set related parameters on the right.
- Application: Application to which the custom API to be called belongs.
- API URL: API to be called. The options in the drop-down list are API tags. If an API tag is in Chinese, the API tag is displayed in Chinese. If an API tag is not defined, the operation name of the API is displayed.
- Request Type: API Request type. The system automatically sets this parameter.
- Parameters: API input parameter. When there are input parameters, they will be displayed automatically.
If an API has an input parameter, you can click Global Variable Config next to the parameter to set the default value of the variable.
- 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 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 a converter created in Creating a Converter to convert data.
You can create a converter only when the data type is ROMA Connector, AstroZero API, HTTP connector, or Prometheus.
- Data Preview: Click the preview button to display the sample packet processed by the converter on the right.
- Click + in the flowchart on the left to add other nodes as required, such as nodes for filtering, sorting, and limiting the number of rows.
- Click Save.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot