Key-Values¶
KeyValue¶
A DataRobot key-value.
Added in version v3.4.
Variables
| Attribute | Type | Description |
|---|---|---|
id |
str |
The ID of the key-value. |
created_at |
str |
The creation time of the key-value. |
entity_id |
str |
The ID of the related entity. |
entity_type |
KeyValueEntityType |
The type of the related entity. |
name |
str |
The key-value name. |
value |
str |
The key-value value. |
numeric_value |
float |
The numeric value of the key-value. |
boolean_value |
bool |
The true/false value of the key-value. |
value_type |
KeyValueType |
The key-value type. |
description |
str |
The key-value description. |
creator_id |
str |
The ID of the user who created the key-value. |
creator_name |
str |
The name of the user who created the key-value. |
category |
KeyValueCategory |
The key-value category. |
artifact_size |
int |
The size in bytes of the associated image, if applicable. |
original_file_name |
str |
The name of the uploaded original image or dataset file. |
is_editable |
bool |
Whether a user with permissions can edit or delete the key-value. |
is_dataset_missing |
bool |
Whether the key-value type is “dataset” and its dataset is not visible to the user. |
error_message |
str |
Additional information if isDataSetMissing is true; blank if there are no errors. |
get()¶
Get the key-value by ID.
Added in version v3.4.
Parameters
| Parameter | Type | Description |
|---|---|---|
key_value_id |
str |
The ID of the key-value. |
Returns
| Returns | Description |
|---|---|
| The retrieved key-value. |
Return type: KeyValue
Raises
| Exception | Description |
|---|---|
| datarobot.errors.ClientError | If the server responded with 4xx status. |
| datarobot.errors.ServerError | If the server responded with 5xx status. |
list()¶
List the key-values.
Added in version v3.4.
Parameters
| Parameter | Type | Description |
|---|---|---|
entity_id |
str |
The ID of the related entity. |
entity_type |
KeyValueEntityType |
The type of the related entity. |
Returns
| Returns | Description |
|---|---|
| A list of key-values. |
Return type: List[KeyValue]
Raises
| Exception | Description |
|---|---|
| datarobot.errors.ClientError | If the server responded with 4xx status. |
| datarobot.errors.ServerError | If the server responded with 5xx status. |
find()¶
Find a key-value by name.
Added in version v3.4.
Parameters
| Parameter | Type | Description |
|---|---|---|
entity_id |
str |
The ID of the related entity. |
entity_type |
KeyValueEntityType |
The type of the related entity. |
name |
str |
The name of the key-value. |
Returns
| Returns | Description |
|---|---|
| A list of key-values. |
Return type: List[KeyValue]
Raises
| Exception | Description |
|---|---|
| datarobot.errors.ClientError | If the server responded with 4xx status. |
| datarobot.errors.ServerError | If the server responded with 5xx status. |
create()¶
Create a Key-Value.
Added in version v3.4.
Parameters
| Parameter | Type | Description |
|---|---|---|
entity_id |
str |
The ID of the associated resource. |
entity_type |
KeyValueEntityType |
The type of the associated resource. |
name |
str |
The name of the key-value. It cannot contain { } ; \|. |
category |
KeyValueCategory |
The category of the key-value. |
value_type |
KeyValueType |
The type of the key-value value. |
value |
Optional[Union[str, float, bool]] |
The value of the key-value. |
description |
Optional[str] |
The description of the key-value. |
Returns
| Returns | Description |
|---|---|
| The created key-value. |
Return type: KeyValue
Raises
| Exception | Description |
|---|---|
| datarobot.errors.ClientError | If the server responded with 4xx status. |
| datarobot.errors.ServerError | If the server responded with 5xx status. |
update()¶
Update the key-value.
Added in version v3.4.
Parameters
| Parameter | Type | Description |
|---|---|---|
entity_id |
Optional[str] |
The ID of the associated resource. |
entity_type |
Optional[KeyValueEntityType] |
The type of the associated resource. |
name |
Optional[str] |
The name of the key-value. It cannot contain { } ; \|. |
category |
Optional[KeyValueCategory] |
The category of the key-value. |
value_type |
Optional[KeyValueType] |
The type of the key-value value. |
value |
Optional[[Union[str, float, bool]] |
The value of the key-value. |
description |
Optional[str] |
The description of the key-value. |
comment |
Optional[str] |
The user comment explaining the change. |
Raises
| Exception | Description |
|---|---|
| datarobot.errors.ClientError | If the server responded with 4xx status. |
| datarobot.errors.ServerError | If the server responded with 5xx status. |
Return type: None
refresh()¶
Update the key-value with the latest data from the server.
Added in version v3.4.
Raises
| Exception | Description |
|---|---|
| datarobot.errors.ClientError | If the server responded with 4xx status. |
| datarobot.errors.ServerError | If the server responded with 5xx status. |
Return type: None
delete()¶
Delete the key-value.
Added in version v3.4.
Raises
| Exception | Description |
|---|---|
| datarobot.errors.ClientError | If the server responded with 4xx status. |
| datarobot.errors.ServerError | If the server responded with 5xx status. |
Return type: None
get_value()¶
Get a value of Key-Value.
Added in version v3.4.
Returns
| Returns | Description |
|---|---|
| value depending on the value type |
Return type: Union[str, float, boolean]
KeyValueCategory¶
Key-Value category
KeyValueEntityType¶
Key-Value entity type
KeyValueType¶
Key-Value type