update_dataset¶
- DatasetsApi.update_dataset(id, role_id, update_dataset_metadata, content_type=None, operation=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Update dataset metadata
Updates dataset metadata for a caller who is an owner or editor. Omit the operation query parameter for a normal metadata update (Message “Successfully updated metadata”, optionally suffixed with a partition-repair notice). For DatasetType=view, success Message is “Dataset updates are in progress”. operation=update_tags updates TBAC tags (s3/lf TBAC datasets only; Messages such as “Tag updated successfully” / “No new tags were added” / async tag-updation email variants). operation=update-glossary-details updates glossary details (Message “Dataset glossary details updated successfully.”).
- Parameters:
id (str) – Dataset ID whose metadata will be updated. (required)
role_id (str) – Amorphic role ID the request is authorized against. Must grant owner or editor access on the dataset. (required)
update_dataset_metadata (UpdateDatasetMetadata) – (required)
content_type (str) – Content-Type for the JSON body (application/json).
operation (str) – Controls the update mode. When omitted, performs a normal metadata update using UpdateDatasetMetadata. “update_tags” updates TBAC tags (TBAC-enabled s3/lf datasets). “update-glossary-details” updates glossary details from the dataset side.
_request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
_request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
_content_type (str, Optional) – force content-type for the request.
_headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
_host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
- Return type:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: PUT /datasets/{id}/updatemetadata
Parameter examples¶
Name |
In |
Example |
|---|---|---|
|
path |
|
Request¶
Update display fields
{
"DatasetDescription": "Order line items, refreshed monthly",
"DisplayName": "Monthly Orders",
"Keywords": [
"orders",
"sales"
],
"DataClassification": [
"internal"
],
"TableUpdate": "append",
"SkipFileHeader": true
}
Rename a column (SchemaOperation=renamecolumn)
{
"SchemaOperation": "renamecolumn",
"DatasetSchema": [
{
"name": "old_col",
"renameColumnTo": "customer_id"
}
]
}
Success (HTTP 200)¶
Metadata update accepted. Message varies by operation: “Successfully updated metadata” (normal; may include partition repair suffix), “Dataset updates are in progress” (views), “Dataset glossary details updated successfully.” (update-glossary-details), or tag-update messages for update_tags.
Normal metadata update
{
"Message": "Successfully updated metadata"
}
Metadata update with partition repair
{
"Message": "Successfully updated metadata. Partition repair process triggered! Once completed, You will receive an email notification with more info!"
}
View metadata update
{
"Message": "Dataset updates are in progress"
}
Glossary details update
{
"Message": "Dataset glossary details updated successfully."
}
TBAC tags updated
{
"Message": "Tag updated successfully"
}
Errors¶
Documented error codes: IPV-1002, GE-1034, DS-1040, AUTH-1005, RTE-1001.
HTTP 400
Invalid input for updating metadata. Body is {“Message”: “<CODE> - <text>”}. Common codes: IPV-1002, GE-1034 (TBAC/tags constraints), DS-1040 (update_tags unsupported target), AUTH-1005 / AUTH-* (not owner/editor).
Invalid DatasetId
{
"Message": "IPV-1002 - Invalid parameter DatasetId with value b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f"
}
update_tags requires TBAC
{
"Message": "GE-1034 - 'update_tags' operation is supported only for TBAC enabled datasets"
}
update_tags unsupported target
{
"Message": "DS-1040 - update_tags is not supported for this dataset target"
}
HTTP 500
Backend/generic failure. Body is {“Message”: “<CODE> - <text>”}.
Request / response example
{
"Message": "RTE-1001 - An error occurred."
}