

# Amazon Athena의 함수
<a name="functions"></a>

Athena 엔진 버전 간 함수 변경 사항에 대해서는 [Athena 엔진 버전 관리](engine-versions.md) 섹션을 참조하세요. `AT TIME ZONE` 연산자에 사용할 수 있는 표준 시간대 목록은 [지원되는 시간대 사용](athena-supported-time-zones.md)를 참조하세요.

**Topics**
+ [Athena 엔진 버전 3](functions-env3.md)

# Athena 엔진 버전 3 함수
<a name="functions-env3"></a>

Athena 엔진 버전 3의 함수는 Trino 기준입니다. Trino 함수, 연산자, 표현식에 대한 자세한 내용은 Trino 설명서에서 [함수 및 연산자](https://trino.io/docs/current/functions.html)와 다음과 같은 하위 섹션을 참조하세요.
+  [집계](https://trino.io/docs/current/functions/aggregate.html) 
+  [배열](https://trino.io/docs/current/functions/array.html) 
+  [이진](https://trino.io/docs/current/functions/binary.html) 
+  [비트](https://trino.io/docs/current/functions/bitwise.html) 
+  [Color(색상)](https://trino.io/docs/current/functions/color.html) 
+  [비교](https://trino.io/docs/current/functions/comparison.html) 
+  [조건](https://trino.io/docs/current/functions/conditional.html) 
+  [변환](https://trino.io/docs/current/functions/conversion.html) 
+  [날짜 및 시간](https://trino.io/docs/current/functions/datetime.html) 
+  [10진수](https://trino.io/docs/current/functions/decimal.html) 
+  [지리 공간](https://trino.io/docs/current/functions/geospatial.html) 
+  [HyperLogLog](https://trino.io/docs/current/functions/hyperloglog.html) 
+  [IP 주소](https://trino.io/docs/current/functions/ipaddress.html) 
+  [JSON](https://trino.io/docs/current/functions/json.html) 
+  [Lambda](https://trino.io/docs/current/functions/lambda.html) 
+  [논리적](https://trino.io/docs/current/functions/logical.html) 
+  [기계 학습](https://trino.io/docs/current/functions/ml.html) 
+  [지도](https://trino.io/docs/current/functions/map.html) 
+  [수학 연산](https://trino.io/docs/current/functions/math.html) 
+  [분위수 다이제스트](https://trino.io/docs/current/functions/qdigest.html) 
+  [정규식](https://trino.io/docs/current/functions/regexp.html) 
+  [세션](https://trino.io/docs/current/functions/session.html) 
+  [세트 다이제스트](https://trino.io/docs/current/functions/setdigest.html) 
+  [문자열](https://trino.io/docs/current/functions/string.html) 
+  [표](https://trino.io/docs/current/functions/table.html) 
+  [Teradata](https://trino.io/docs/current/functions/teradata.html) 
+  [T-다이제스트](https://trino.io/docs/current/functions/tdigest.html) 
+  [URL](https://trino.io/docs/current/functions/url.html) 
+  [UUID](https://trino.io/docs/current/functions/uuid.html) 
+  [Window](https://trino.io/docs/current/functions/window.html) 

## invoker\$1principal() 함수
<a name="functions-env3-invoker-principal"></a>

`invoker_principal` 함수는 Athena 엔진 버전 3에만 있으며 Trino에는 없습니다.

함수를 호출하여 쿼리를 실행한 보안 주체(IAM 역할 또는 Identity Center 자격 증명)의 ARN이 포함된 `VARCHAR`를 반환합니다. 예를 들어 쿼리 호출자가 IAM 역할의 권한을 사용하여 쿼리를 실행하는 경우 함수는 IAM 역할의 ARN을 반환합니다. 쿼리를 실행하는 역할은 `LakeFormation:GetDataLakePrincipal` 작업을 허용해야 합니다.

### 사용법
<a name="functions-invoker-principal-usage"></a>

```
SELECT invoker_principal()
```

다음 표는 결과 예시를 보여줍니다.


****  

| \$1 | \$1col0 | 
| --- | --- | 
| 1 | arn:aws:iam::111122223333:role/Admin | 