---
schema_version: "1"
id: 12a7eb240a8fe4d55c796bca10ca07444fcbc447638dee42110ef36a509d60f6
title: location
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.12/dw-runtime-functions-location.md
canonical_url: https://docs.mulesoft.com/dataweave/2.12/dw-runtime-functions-location
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 238ef7ee3b09c419469d1b43a07449928165034910fd03443cd20c869f5f0607
description: MuleSoft Documentation Site
release: "2.12"
latest: false
---
---
product: DataWeave
version: 2.12
---

# location

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## location(value: Any): Location

Returns the location of a given value, or `null` if the location can’t be traced back to a DataWeave
file.

_Introduced in DataWeave version 2.4.0._

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>value</code></p></td><td><p>A value of any type.</p></td></tr></tbody></table>

### Example

This example returns the location that defines the function `sqrt` in the `dw::Core` module.

#### Source

```DataWeave
%dw 2.0
import location from dw::Runtime
output application/json
---
location(sqrt)
```

#### Output

```JSON
{
  "uri": "/dw/Core.dwl",
  "nameIdentifier": "dw::Core",
  "startLine": 5797,
  "startColumn": 36,
  "endLine": 5797,
  "endColumn": 77
}
```
