Contact Us 1-800-596-4880

location

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

Name Description

value

A value of any type.

Example

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

Source

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

Output

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