Help Center/ Data Warehouse Service/ SDK Reference/ Obtaining SDK Sample Code
Updated on 2026-11-12 GMT+08:00

Obtaining SDK Sample Code

Huawei Cloud allows you to obtain the SDK sample code of an API in the following ways to simplify SDK usage and improve development efficiency.

API Explorer can dynamically generate SDK sample code as needed and supports multiple programming languages. You are advised to use API Explorer to obtain the SDK sample code.

Obtaining SDK Sample Code Through API Explorer

  1. On the API Explorer page of the Data Warehouse Service console, select the API for which you want to generate the SDK sample code.
  2. On the parameter configuration page in the middle, set the parameters required for calling the API. For details about parameter settings, click the Documentation tab on the right.
  3. On the Sample Code tab on the right, select a programming language and click Huawei Cloud SDK to view and obtain the SDK sample code of the corresponding programming language. For details about the SDK sample code supported by DWS, see Table 1.

    Figure 1 Obtaining the SDK sample code

Obtaining SDK Sample Code from the API Reference

  1. In the DWS API Reference, locate the API page for which you want to obtain the SDK sample code.
  2. In the navigation tree on the right, click SDK Sample Code to view the SDK sample code.

    The current document provides only the SDK sample code in Java, Python, and Go. The sample code is generated based on the example request values. If you need sample code in other programming languages or want to set custom parameters in the sample code, see Obtaining SDK Sample Code Through API Explorer.

    Figure 2 Obtaining the SDK sample code