Use this API to update a dataset in the metrics platform.
API URL
POST Http://{anymetrics_host:anymetrics_port}/anymetrics/api/v1/dataset/update
For how to obtain anymetrics_host:anymetrics_port, see Calling APIs.
Request Parameters
Common Request Parameters (Headers)
Parameter
Type
Required
Description
tenant-id
String
Yes
Tenant ID. Identifies the tenant for metric query content.
auth-type
String
Yes
Authentication method. Supported values: UID, TOKEN, ACCOUNT, and APIKEY.
auth-value
String
Yes
Authentication value corresponding to auth-type.
How to Obtain Common Parameters
To obtain tenant-id, select a metrics application in the top navigation bar of Aloudata CAN, choose API Integration from the left navigation menu, and copy it from the API Integration page. Set auth-value according to the selected auth-type.
Body Request Parameters
Main Table Parameters
Parameter
Type
Required
Maximum Length
Description
name
String
Yes
128
Dataset name. It is used as the unique identifier and cannot be modified.
displayName
String
Yes
128
Dataset display name.
description
String
No
256
Dataset description.
sourceInfo
Object
Yes
-
Source data information. See the sourceInfo parameter description.
defColumns
List
No
-
Field definition list. See the defColumns parameter description. If omitted or empty, the system retrieves fields from the data source again.
relations
List
No
-
List of relationships actively defined from this dataset.
partitionMapping
Object
No
-
Partition mapping configuration.
filterExpr
String
No
-
Dataset-level filter condition. We recommend passing an expression string.
sourceInfo Parameter Description
Parameter
Type
Required
Maximum Length
Description
name
String
Yes
128
Source data name.
displayName
String
No
128
Source data display name.
description
String
No
256
Source data description.
content
String
Yes
-
Source data content. For physical tables, this is usually the table GUID or fully qualified table name.
type
String
Yes
32
Source data type. Enumerated values: TABLE, SQL.
datasourceName
String
No
128
Data source name. Required when type=SQL.
datasourceItems
Array
Yes
-
Data source list. Only one element is supported. See the datasourceItems parameter description.
datasourceItems Parameter Description
Parameter
Type
Required
Description
id
String
Yes
Data source GUID.
name
String
Yes
Data source name.
queryEngineType
String
Yes
Query engine type, such as AIR.
defColumns Parameter Description
Parameter
Type
Required
Maximum Length
Description
name
String
Yes
128
Field name. It cannot be modified.
displayName
String
No
128
Field display name.
description
String
No
256
Field description.
type
String
Yes
32
Field type. Enumerated values: DIMENSION, MEASURE.
originDataType
String
Yes
-
Original data type, such as DECIMAL, VARCHAR, or TIMESTAMP.
isHidden
Boolean
No
-
Whether to hide the field.
isPartition
Boolean
No
-
Whether the field is a partition field.
isPrimaryKey
Boolean
No
-
Whether the field is a primary key field.
sourceColumn
String
No
128
Source field. Recommended for physical table fields.