# extract_partition_key_value

> **Function** in `langchain_azure_cosmosdb`

📖 [View in docs](https://reference.langchain.com/python/langchain-azure-cosmosdb/_utils/extract_partition_key_value)

Extract the partition-key value for ``item`` given its key paths.

## Signature

```python
extract_partition_key_value(
    item: Dict[str, Any],
    pk_paths: List[str],
) -> Any
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `item` | `Dict[str, Any]` | Yes | The document to extract the value from. |
| `pk_paths` | `List[str]` | Yes | Key paths from :func:`extract_partition_key_paths` (e.g. ``["/tenant/id"]``). |

## Returns

`Any`

The scalar partition-key value.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-azure/blob/e62c2a55aaa0942fdac739b4066011953b80018e/libs/azure-cosmosdb/src/langchain_azure_cosmosdb/_utils.py#L76)