---
title: reflect function
description: Learn the syntax of the reflect function of the SQL language in Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/functions/reflect
---

# `reflect` function

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime 11.3 LTS and above

Calls a method with reflection.

The method might return an exception. To return a `NULL` instead, use [try\_reflect](https://docs.databricks.com/aws/en/sql/language-manual/functions/try_reflect.md).

## Syntax

```
reflect(class, method [, arg1] [, ...])
```

## Arguments

* `class`: A `STRING` literal specifying the java class.
* `method`: A `STRING` literal specifying the java method.
* `argN`: An expression with a type appropriate for the selected method.

## Returns

A `STRING`.

## Examples

```sql
> SELECT reflect('java.util.UUID', 'randomUUID');
 c33fb387-8500-4bfa-81d2-6e0e3e930df2

> SELECT reflect('java.util.UUID', 'fromString', 'a5cf6c42-0c85-418f-af6c-3e4e5b1328f2');
 A5cf6c42-0c85-418f-af6c-3e4e5b1328f2

> SELECT reflect('java.lang.Integer', 'divideUnsigned',10,0);
 Error

> SELECT try_reflect('java.lang.Integer', 'divideUnsigned',10,0);
 NULL
```

## Related functions

* [`java_method` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/java_method.md)
* [`try_reflect` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/try_reflect.md)
