> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# bitmap_hash64

> Calculates a 64-bit hash value for any type of input and returns a bitmap containing the hash value.

Calculates a 64-bit hash value for any type of input and returns a bitmap containing the hash value. It is mainly used to load non-integer data into the BITMAP field of the table via Stream Load. For example:

```bash theme={null}
cat data | curl --location-trusted -u user:passwd -T - \
    -H "columns: dt,page,device_id, device_id=bitmap_hash64(device_id)" \
    http://<fe_host>:8030/api/test_db/tbl1/_stream_load
```

## Syntax

```Haskell theme={null}
BITMAP BITMAP_HASH64(expr)
```

## Parameters

`expr`: The input can be of any data type.

## Return value

Returns a value of the BITMAP data type.

## Examples

```Plain Text theme={null}
MySQL > select bitmap_count(bitmap_hash64('hello'));
+--------------------------------------+
| bitmap_count(bitmap_hash64('hello')) |
+--------------------------------------+
|                                    1 |
+--------------------------------------+

select bitmap_to_string(bitmap_hash64('hello'));
+------------------------------------------+
| bitmap_to_string(bitmap_hash64('hello')) |
+------------------------------------------+
| 10760762337991515389                     |
+------------------------------------------+
```

## keyword

BITMAP\_HASH64,BITMAP


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.