---
title: recordLocation
description: |
  Return the cloud storage location of a record, such as the URL of an S3 object
  when using AWS S3.

  !!! note
      Works only with data stored in your cloud storage. Running this on indexed
      documents (Frequent Search mode) will return `null`.

      Use it alongside [`dataset()`](./dataset.mdx) and [`dataspace()`](./dataspace.mdx)
      to capture the full source of a record, its dataspace, dataset, and exact
      storage location.
url: https://coralogix.com/docs/dataprime/language-reference/functions-reference/general/recordlocation/
product: dataengine
feature: DataPrime Language
feature_id: dataprime-language
feature_identifier: dataengine/dataprime-language
last_updated: '2026-10-21'
---

# `recordLocation`

## Description

Return the cloud storage location of a record, such as the URL of an S3 object when using AWS S3.

Note

Works only with data stored in your cloud storage. Running this on indexed documents (Frequent Search mode) will return `null`.

Use it alongside [\`dataset()\`](https://coralogix.com/docs/dataprime/language-reference/functions-reference/general/dataset.md) and [\`dataspace()\`](https://coralogix.com/docs/dataprime/language-reference/functions-reference/general/dataspace.md) to capture the full source of a record, its dataspace, dataset, and exact storage location.

## Syntax

```
recordLocation(): string
```

## Example

**Use case: Add the storage URL to documents** Attach the S3 object URL to each document for easier navigation between logs and raw storage.

### Example data

```
{

    "service": "backend-service",

    "status_code": 500

}
```

### Example query

```
create s3_location from recordLocation()
```

### Example output

```
{

    "service": "backend-service",

    "status_code": 500,

    "s3_location": "s3://your-bucket/path/to/object"

}
```
