remove_field
Remove one field value from a single record and return the removed value, with a single database operation. Return None if the removal failed.
#
ParametersProperty name | Required | Accepted types | Default | Description |
---|---|---|---|---|
key_value | YES | Any | - | The path expression to target the attribute to set/update in your record. See Field path selectors |
field_path | YES | str | - | The path expression to target the attribute to set/update in your record. See Field path selectors |
query_kwargs | NO | dict | None | Used to pass data to populate a field_path that contains keys. See example below : |
data_validation | NO | bool | True | Whether data validation from your table model should be applied on the retrieved data. |
#
AvailabilityTable | Available |
---|---|
DynamoDBBasicTable | ✅ |
DynamoDBCachingTable | ✅ |
ExternalDynamoDBApiBasicTable | ✅ |
ExternalDynamoDBApiCachingTable | ✅ |
#
Example : Basic#
Queried record#
Code#
Output#
Example : Multi-fields selectorThis example shows how to use multi selectors, to specify multiple fields to remove at once in a single database operation without having to use the remove_multiple_fields operation. Read more about multi-fields selector at Multi-fields selectors.