Get started
Load & manage data
Work with data
Administration
Reference & resources
Updated Oct 03, 2023
Send us feedback
reflect
Applies to: Databricks Runtime 11.2 and above
Calls a method with reflection.
reflect(class, method [, arg1] [, ...])
class: A STRING literal specifying the java class.
class
method: A STRING literal specifying the java method.
method
argN: An expression with a type appropriate for the selected method.
argN
A STRING.
> 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
java_method function