# Record storage

Aerospike record storage data expressions allow you to access and retrieve values stored in bins and keys within records.

This guide covers expressions like `bin_blob`, `bin_exists`, `bin_float`, `bin_geo`, `bin_int`, `bin_list`, `bin_map`, `bin_str`, `key_blob`, `key_int`, and `key_str`, which enable efficient data retrieval based on bin type or record key. Code examples demonstrate how to use them effectively in queries.

## Ops

#### `bin_blob`

```python
bin_blob(name)
```

Description: Retrieve the bin with the name indicated by `name` as a blob\_bin. Return `unknown` if the bin does not exist or the bin is a different type.

Arguments: | Name | Type |
| --- | --- |
| `name` | `string_value` |

Returns: `blob_bin`

Introduced: 5.2.0.4

---

#### `bin_exists`

```python
bin_exists(name)
```

Description: Returns `true` if a bin exists on the record with the name indicated by `name`, otherwise returns `unknown`.

Arguments: | Name | Type |
| --- | --- |
| `name` | `string_value` |

Returns: `boolean_value`

Introduced: 5.2.0.4

---

#### `bin_float`

```python
bin_float(name)
```

Description: Retrieve the bin with the name indicated by `name` as a float\_bin. Return `unknown` if the bin does not exist or the bin is a different type.

Arguments: | Name | Type |
| --- | --- |
| `name` | `string_value` |

Returns: `float_bin`

Introduced: 5.2.0.4

---

#### `bin_geo`

```python
bin_geo(name)
```

Description: Retrieve the bin with the name indicated by `name` as a geojson\_bin. Return `unknown` if the bin does not exist or the bin is a different type.

Arguments: | Name | Type |
| --- | --- |
| `name` | `string_value` |

Returns: `geojson_bin`

Introduced: 5.2.0.4

---

#### `bin_hll`

```python
bin_hll(name)
```

Description: Retrieve the bin with the name indicated by `name` as a hll\_bin. Return `unknown` if the bin does not exist or the bin is a different type.

Arguments: | Name | Type |
| --- | --- |
| `name` | `string_value` |

Returns: `hll_bin`

Introduced: 5.2.0.4

---

#### `bin_int`

```python
bin_int(name)
```

Description: Retrieve the bin with the name indicated by `name` as a integer\_bin. Return `unknown` if the bin does not exist or the bin is a different type.

Arguments: | Name | Type |
| --- | --- |
| `name` | `string_value` |

Returns: `integer_bin`

Introduced: 5.2.0.4

---

#### `bin_list`

```python
bin_list(name)
```

Description: Retrieve the bin with the name indicated by `name` as a list\_bin. Return `unknown` if the bin does not exist or the bin is a different type.

Arguments: | Name | Type |
| --- | --- |
| `name` | `string_value` |

Returns: `list_bin`

Introduced: 5.2.0.4

---

#### `bin_map`

```python
bin_map(name)
```

Description: Retrieve the bin with the name indicated by `name` as a map\_bin. Return `unknown` if the bin does not exist or the bin is a different type.

Arguments: | Name | Type |
| --- | --- |
| `name` | `string_value` |

Returns: `map_bin`

Introduced: 5.2.0.4

---

#### `bin_str`

```python
bin_str(name)
```

Description: Retrieve the bin with the name indicated by `name` as a string\_bin. Return `unknown` if the bin does not exist or the bin is a different type.

Arguments: | Name | Type |
| --- | --- |
| `name` | `string_value` |

Returns: `string_bin`

Introduced: 5.2.0.4

---

#### `bin_type`

```python
bin_type(name)
```

Description: Retrieve the data type of the bin with the name indicated by `name` in [ParticleType format](https://github.com/aerospike/aerospike-client-java/blob/master/client/src/com/aerospike/client/command/ParticleType.java). Return `unknown` if the bin does not exist.

The following list shows each bin ParticleType and its associated integer value:

**NULL**: 0

**INTEGER**: 1

**DOUBLE**: 2

**STRING**: 3

**BLOB**: 4

**JBLOB**: 7

**BOOL**: 17

**HLL**: 18

**MAP**: 19

**LIST**: 20

**GEOJSON**: 23

Arguments: | Name | Type |
| --- | --- |
| `name` | `string_value` |

Returns: `ParticleType`

Introduced: 5.2.0.4

---

#### `key_blob`

```python
key_blob()
```

Description: Retrieve the key as a [blob/bytes](https://aerospike.com/develop/data-types/blob). Return `unknown` if the key does not exist or the key is a different type.

Returns: `blob_value`

Introduced: 5.2.0.4

---

#### `key_int`

```python
key_int()
```

Description: Retrieve the key as a integer. Return `unknown` if the key does not exist or the key is a different type.

Returns: `integer_value`

Introduced: 5.2.0.4

---

#### `key_str`

```python
key_str()
```

Description: Retrieve the key as a string. Return `unknown` if the key does not exist or the key is a different type.

Returns: `string_value`

Introduced: 5.2.0.4

---