All Products
Search
Document Center

Quick BI:UpdateDataSource

Last Updated:Nov 04, 2025
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Modify Data Source Configuration

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
UpdateModelstringYes

Refer to the example JSON for parameter values. The parameters are explained as follows:

  • dsId -- Required -- Data source ID
  • userId -- Optional -- User identity for modifying the data source, quickbi's userId. If provided, it will use the current userId for modification.
  • dsType -- Required -- Data source type, not allowed to be modified, just pass the data source type.
  • showName -- Optional -- Display name of the data source.
  • address -- Optional -- Database connection string (domain or IP)
  • port -- Optional -- Port
  • schema -- Optional -- Database schema, only required for databases that support schemas. Example: sqlserver uses dbo by default; mysql does not support schemas.
  • instance -- Optional -- Instance db
  • username -- Optional -- Database username/ak
  • password -- Optional -- Database key
  • config -- Optional -- Additional database configuration items. Note that this data should be consistent with the different config parameters passed during creation for different data sources. Fields that do not need to be modified do not require parameters. For fields where parameters are passed, the default is to modify according to the passed parameters (including empty strings).
{ "schema": "schema", "userId":"S*****46345", "password": "Ta****34", "showName": "TEST", "address": "11*****.55", "instance": "quickbi_test", "dsId": "34d6d******3ca8ac267", "port": "3306", "dsType": "mysql", "username": "root", "config": { "initialSql": "Set timezone = '-10'" } }

Example Code: @Test

public void UpdateDataSource () throws SDKException, ClientException {
    UpdateDataSourceRequest request = new UpdateDataSourceRequest();
    HashMap<String,Object> updateModel = new HashMap<>();
    updateModel.put("dsId", "342e*******455");
    updateModel.put("userId","74f5*****20ebf278c8");
    updateModel.put("dsType", "impala");
    updateModel.put("address", "12***22");
    updateModel.put("instance", "default");
    updateModel.put("showName", "wk***TETST");
    request.setUpdateModel(JSONObject.toJSONString(updateModel));
    System.out.println(JSONObject.toJSONString(updateModel));
    request.setSysConnectTimeout(60000);request.setSysReadTimeout(60000);
    UpdateDataSourceResponse  acsResponse = getPopAPIClient("test").getAcsResponse(request);

    System.out.println(JSONObject.toJSONString(acsResponse.getResult()));
}

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Request ID.

D787E1A***********5DF8D885
Resultboolean

Result of the API call. Possible values:

  • true: Request successful
  • false: Request failed
true
Successboolean

Indicates whether the request was successful. Possible values:

  • true: Request successful
  • false: Request failed
true

Examples

Sample success responses

JSONformat

{
  "RequestId": "D787E1A***********5DF8D885",
  "Result": true,
  "Success": true
}

Error codes

HTTP status codeError codeError messageDescription
400Internal.System.ErrorAn internal system error occurred.An internal system error occurred.
400Invalid.Parameter.ErrorThe parameter is invalid:%s.invalid parameter: ${0}.
400User.NotIn.WorkspaceThe user is not a member of the group workspace.The user is not a member of the group workspace.
400NoPermissionTo.Operate.ObjectYou are not authorized to operate the objects.You are not authorized to do this.
400DatasourceId.IsNull.ErrorYou must select a data source before selecting the table.You must select a data source before selecting the table.
400Datasource.NotFound.ErrorThe specified data source does not exist: %s.The specified data source does not exist: %s.
400Name.RegularExpression.ErrorName format validation failed.-
400NameExceeded.MaxLength.ErrorThe name cannot exceed %s characters in length.The name cannot be longer than% s characters.
400Database.PortInvalid.ErrorThe database port is invalid.The database port is invalid.

For a list of error codes, visit the Service error codes.