

Doc AWS SDK 예제 GitHub 리포지토리에서 더 많은 SDK 예제를 사용할 수 있습니다. [AWS](https://github.com/awsdocs/aws-doc-sdk-examples) 

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 를 사용한 Athena 예제 AWS CLI
<a name="cli_2_athena_code_examples"></a>

다음 코드 예제에서는 Athena와 AWS Command Line Interface 함께를 사용하여 작업을 수행하고 일반적인 시나리오를 구현하는 방법을 보여줍니다.

*작업*은 대규모 프로그램에서 발췌한 코드이며 컨텍스트에 맞춰 실행해야 합니다. 작업은 개별 서비스 함수를 직접적으로 호출하는 방법을 보여주며 관련 시나리오의 컨텍스트에 맞는 작업을 볼 수 있습니다.

각 예시에는 전체 소스 코드에 대한 링크가 포함되어 있으며, 여기에서 컨텍스트에 맞춰 코드를 설정하고 실행하는 방법에 대한 지침을 찾을 수 있습니다.

**Topics**
+ [작업](#actions)

## 작업
<a name="actions"></a>

### `batch-get-named-query`
<a name="athena_BatchGetNamedQuery_cli_2_topic"></a>

다음 코드 예시는 `batch-get-named-query`의 사용 방법을 보여줍니다.

**AWS CLI**  
**둘 이상의 쿼리에 대한 정보를 반환하는 방법**  
다음 `batch-get-named-query` 예제에서는 지정된 ID가 있는 명명된 쿼리들에 대한 정보를 반환합니다.  

```
aws athena batch-get-named-query \
    --named-query-ids a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 a1b2c3d4-5678-90ab-cdef-EXAMPLE22222 a1b2c3d4-5678-90ab-cdef-EXAMPLE33333
```
출력:  

```
{
    "NamedQueries": [
        {
            "Name": "Flights Select Query",
            "Description": "Sample query to get the top 10 airports with the most number of departures since 2000",
            "Database": "sampledb",
            "QueryString": "SELECT origin, count(*) AS total_departures\nFROM\nflights_parquet\nWHERE year >= '2000'\nGROUP BY origin\nORDER BY total_departures DESC\nLIMIT 10;",
            "NamedQueryId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "WorkGroup": "primary"
        },
        {
            "Name": "Load flights table partitions",
            "Description": "Sample query to load flights table partitions using MSCK REPAIR TABLE statement",
            "Database": "sampledb",
            "QueryString": "MSCK REPAIR TABLE flights_parquet;",
            "NamedQueryId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
            "WorkGroup": "primary"
        },
        {
            "Name": "CloudFront Select Query",
            "Description": "Sample query to view requests per operating system during a particular time frame",
            "Database": "sampledb",
            "QueryString": "SELECT os, COUNT(*) count FROM cloudfront_logs WHERE date BETWEEN date '2014-07-05' AND date '2014-08-05' GROUP BY os;",
            "NamedQueryId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333",
            "WorkGroup": "primary"
        }
    ],
    "UnprocessedNamedQueryIds": []
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [Amazon Athena를 사용하여 SQL 쿼리 실행](https://docs.aws.amazon.com/athena/latest/ug/querying-athena-tables.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [BatchGetNamedQuery](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/batch-get-named-query.html)를 참조하세요.

### `batch-get-query-execution`
<a name="athena_BatchGetQueryExecution_cli_2_topic"></a>

다음 코드 예시는 `batch-get-query-execution`의 사용 방법을 보여줍니다.

**AWS CLI**  
**하나 이상의 쿼리 실행에 대한 정보를 반환하는 방법**  
다음 `batch-get-query-execution` 예제에서는 지정된 쿼리 ID가 있는 쿼리들에 대한 쿼리 실행 정보를 반환합니다.  

```
aws athena batch-get-query-execution \
    --query-execution-ids a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 a1b2c3d4-5678-90ab-cdef-EXAMPLE22222
```
출력:  

```
{
    "QueryExecutions": [
        {
            "QueryExecutionId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "Query": "create database if not exists webdata",
            "StatementType": "DDL",
            "ResultConfiguration": {
                "OutputLocation": "s3://amzn-s3-demo-bucket/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111.txt"
            },
            "QueryExecutionContext": {},
            "Status": {
                "State": "SUCCEEDED",
                "SubmissionDateTime": 1593470720.592,
                "CompletionDateTime": 1593470720.902
            },
            "Statistics": {
                "EngineExecutionTimeInMillis": 232,
                "DataScannedInBytes": 0,
                "TotalExecutionTimeInMillis": 310,
            "ResultConfiguration": {

                "QueryQueueTimeInMillis": 50,
                "ServiceProcessingTimeInMillis": 28
            },
            "WorkGroup": "AthenaAdmin"
        },
        {
            "QueryExecutionId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
            "Query": "select date, location, browser, uri, status from cloudfront_logs where method = 'GET' and status = 200 and location like 'SFO%' limit 10",
            "StatementType": "DML",
            "ResultConfiguration": {
                "OutputLocation": "s3://amzn-s3-demo-bucket/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222.csv"
            },
            "QueryExecutionContext": {
                "Database": "mydatabase",
                "Catalog": "awsdatacatalog"
            },
            "Status": {
                "State": "SUCCEEDED",
                "SubmissionDateTime": 1593469842.665,
                "CompletionDateTime": 1593469846.486
            },
            "Statistics": {
                "EngineExecutionTimeInMillis": 3600,
                "DataScannedInBytes": 203089,
                "TotalExecutionTimeInMillis": 3821,
                "QueryQueueTimeInMillis": 267,
                "QueryPlanningTimeInMillis": 1175
            },
            "WorkGroup": "AthenaAdmin"
        }
    ],
    "UnprocessedQueryExecutionIds": []
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [Amazon Athena를 사용하여 SQL 쿼리 실행](https://docs.aws.amazon.com/athena/latest/ug/querying-athena-tables.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [BatchGetQueryExecution](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/batch-get-query-execution.html)을 참조하세요.

### `create-data-catalog`
<a name="athena_CreateDataCatalog_cli_2_topic"></a>

다음 코드 예시는 `create-data-catalog`의 사용 방법을 보여줍니다.

**AWS CLI**  
**데이터 카탈로그를 생성하는 방법**  
다음 `dynamo_db_catalog` 예제에서는 `create-data-catalog` 데이터 카탈로그를 생성합니다.  

```
aws athena create-data-catalog \
    --name dynamo_db_catalog \
    --type LAMBDA \
    --description "DynamoDB Catalog" \
    --parameters function=arn:aws:lambda:us-west-2:111122223333:function:dynamo_db_lambda
```
이 명령은 출력을 생성하지 않습니다. 결과를 보려면 `aws athena get-data-catalog --name dynamo_db_catalog`를 사용합니다.  
자세한 내용은 *Amazon Athena 사용 설명서*의 [카탈로그 등록: create-data-catalog](https://docs.aws.amazon.com/athena/latest/ug/datastores-hive-cli.html#datastores-hive-cli-registering-a-catalog)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateDataCatalog](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/create-data-catalog.html)를 참조하세요.

### `create-named-query`
<a name="athena_CreateNamedQuery_cli_2_topic"></a>

다음 코드 예시는 `create-named-query`의 사용 방법을 보여줍니다.

**AWS CLI**  
**명명된 쿼리를 생성하는 방법**  
다음 `create-named-query` 예제에서는 출발 및 도착이 모두 10분 넘게 지연된 2016년 1월 시애틀 출발 뉴욕 도착 항공편에 대해 `flights_parquet` 테이블에 쿼리하는 `AthenaAdmin` 작업 그룹의 저장된 쿼리를 생성합니다. 테이블의 공항 코드 값은 큰따옴표가 포함된 문자열(예: “SEA”)이므로 이러한 값은 백슬래시로 이스케이프되고 작은따옴표로 묶입니다.  

```
aws athena create-named-query \
    --name "SEA to JFK delayed flights Jan 2016" \
    --description "Both arrival and departure delayed more than 10 minutes." \
    --database sampledb \
    --query-string "SELECT flightdate, carrier, flightnum, origin, dest, depdelayminutes, arrdelayminutes FROM sampledb.flights_parquet WHERE yr = 2016 AND month = 1 AND origin = '\"SEA\"' AND dest = '\"JFK\"' AND depdelayminutes > 10 AND arrdelayminutes > 10" \
    --work-group AthenaAdmin
```
출력:  

```
{
    "NamedQueryId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [Amazon Athena를 사용하여 SQL 쿼리 실행](https://docs.aws.amazon.com/athena/latest/ug/querying-athena-tables.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateNamedQuery](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/create-named-query.html)를 참조하세요.

### `create-work-group`
<a name="athena_CreateWorkGroup_cli_2_topic"></a>

다음 코드 예시는 `create-work-group`의 사용 방법을 보여줍니다.

**AWS CLI**  
**작업 그룹을 생성하는 방법**  
다음 `create-work-group` 예제에서는 쿼리 결과 출력 위치 `s3://amzn-s3-demo-bucket`이 있는 `Data_Analyst_Group`이라는 이름의 작업 그룹을 생성합니다. 이 명령은 클라이언트 구성 설정을 재정의하는 작업 그룹을 생성하며 여기에 쿼리 결과 출력 위치가 포함됩니다. 또한 이 명령은 CloudWatch 지표를 활성화하고 세 개의 키-값 태그 페어를 작업 그룹에 추가하여 다른 작업 그룹과 구분합니다. 참고로, `--configuration` 인수에는 옵션을 구분하는 쉼표 앞에 공백이 없습니다.  

```
aws athena create-work-group \
    --name Data_Analyst_Group \
    --configuration ResultConfiguration={OutputLocation="s3://amzn-s3-demo-bucket"},EnforceWorkGroupConfiguration="true",PublishCloudWatchMetricsEnabled="true" \
    --description "Workgroup for data analysts" \
    --tags Key=Division,Value=West Key=Location,Value=Seattle Key=Team,Value="Big Data"
```
이 명령은 출력을 생성하지 않습니다. 결과를 보려면 `aws athena get-work-group --work-group Data_Analyst_Group`을 사용합니다.  
자세한 내용은 *Amazon Athena 사용 설명서*의 [작업 그룹 관리](https://docs.aws.amazon.com/athena/latest/ug/workgroups-create-update-delete.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateWorkGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/create-work-group.html)을 참조하세요.

### `delete-data-catalog`
<a name="athena_DeleteDataCatalog_cli_2_topic"></a>

다음 코드 예시는 `delete-data-catalog`의 사용 방법을 보여줍니다.

**AWS CLI**  
**데이터 카탈로그를 삭제하는 방법**  
다음 `delete-data-catalog` 예제에서는 `UnusedDataCatalog` 데이터 카탈로그를 삭제합니다.  

```
aws athena delete-data-catalog \
    --name UnusedDataCatalog
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *Amazon Athena 사용 설명서*의 [카탈로그 삭제: delete-data-catalog](https://docs.aws.amazon.com/athena/latest/ug/datastores-hive-cli.html#datastores-hive-cli-deleting-a-catalog)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteDataCatalog](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/delete-data-catalog.html)를 참조하세요.

### `delete-named-query`
<a name="athena_DeleteNamedQuery_cli_2_topic"></a>

다음 코드 예시는 `delete-named-query`의 사용 방법을 보여줍니다.

**AWS CLI**  
**명명된 쿼리를 삭제하는 방법**  
다음 `delete-named-query` 예제에서는 지정된 ID가 있는 명명된 쿼리를 삭제합니다.  

```
aws athena delete-named-query \
    --named-query-id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *Amazon Athena 사용 설명서*의 [Amazon Athena를 사용하여 SQL 쿼리 실행](https://docs.aws.amazon.com/athena/latest/ug/querying-athena-tables.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteNamedQuery](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/delete-named-query.html)를 참조하세요.

### `delete-work-group`
<a name="athena_DeleteWorkGroup_cli_2_topic"></a>

다음 코드 예시는 `delete-work-group`의 사용 방법을 보여줍니다.

**AWS CLI**  
**작업 그룹을 삭제하는 방법**  
다음 `delete-work-group` 예제에서는 `TeamB` 작업 그룹을 삭제합니다.  

```
aws athena delete-work-group \
    --work-group TeamB
```
이 명령은 출력을 생성하지 않습니다. 삭제를 확인하려면 `aws athena list-work-groups`를 사용합니다.  
자세한 내용은 *Amazon Athena 사용 설명서*의 [작업 그룹 관리](https://docs.aws.amazon.com/athena/latest/ug/workgroups-create-update-delete.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteWorkGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/delete-work-group.html)을 참조하세요.

### `get-data-catalog`
<a name="athena_GetDataCatalog_cli_2_topic"></a>

다음 코드 예시는 `get-data-catalog`의 사용 방법을 보여줍니다.

**AWS CLI**  
**데이터 카탈로그에 대한 정보를 반환하는 방법**  
다음 `get-data-catalog` 예제에서는 `dynamo_db_catalog` 데이터 카탈로그에 대한 정보를 반환합니다.  

```
aws athena get-data-catalog \
    --name dynamo_db_catalog
```
출력:  

```
{
    "DataCatalog": {
        "Name": "dynamo_db_catalog",
        "Description": "DynamoDB Catalog",
        "Type": "LAMBDA",
        "Parameters": {
            "catalog": "dynamo_db_catalog",
            "metadata-function": "arn:aws:lambda:us-west-2:111122223333:function:dynamo_db_lambda",
            "record-function": "arn:aws:lambda:us-west-2:111122223333:function:dynamo_db_lambda"
        }
    }
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [카탈로그 세부 정보 표시: get-data-catalog](https://docs.aws.amazon.com/athena/latest/ug/datastores-hive-cli.html#datastores-hive-cli-showing-details-of-a-catalog)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetDataCatalog](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/get-data-catalog.html)를 참조하세요.

### `get-database`
<a name="athena_GetDatabase_cli_2_topic"></a>

다음 코드 예시는 `get-database`의 사용 방법을 보여줍니다.

**AWS CLI**  
**데이터 카탈로그에서 데이터베이스에 대한 정보를 반환하는 방법**  
다음 `get-database` 예제에서는 `AwsDataCatalog` 데이터 카탈로그에서 `sampledb` 데이터베이스에 대한 정보를 반환합니다.  

```
aws athena get-database \
    --catalog-name AwsDataCatalog \
    --database-name sampledb
```
출력:  

```
{
    "Database": {
        "Name": "sampledb",
        "Description": "Sample database",
        "Parameters": {
            "CreatedBy": "Athena",
            "EXTERNAL": "TRUE"
        }
    }
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [데이터베이스 세부 정보 표시: get-database](https://docs.aws.amazon.com/athena/latest/ug/datastores-hive-cli.html#datastores-hive-cli-showing-details-of-a-database)를 참조하세요.  
+  API에 대한 세부 정보는 *AWS CLI 명령 참조*의 [GetDatabase](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/get-database.html)를 참조하세요.

### `get-named-query`
<a name="athena_GetNamedQuery_cli_2_topic"></a>

다음 코드 예시는 `get-named-query`의 사용 방법을 보여줍니다.

**AWS CLI**  
**명명된 쿼리를 반환하는 방법**  
다음 `get-named-query` 예제에서는 지정된 ID가 있는 쿼리에 대한 정보를 반환합니다.  

```
aws athena get-named-query \
    --named-query-id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
```
출력:  

```
{
    "NamedQuery": {
        "Name": "CloudFront Logs - SFO",
        "Description": "Shows successful GET request data for SFO",
        "Database": "default",
        "QueryString": "select date, location, browser, uri, status from cloudfront_logs where method = 'GET' and status = 200 and location like 'SFO%' limit 10",
        "NamedQueryId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
        "WorkGroup": "AthenaAdmin"
    }
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [Amazon Athena를 사용하여 SQL 쿼리 실행](https://docs.aws.amazon.com/athena/latest/ug/querying-athena-tables.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetNamedQuery](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/get-named-query.html)를 참조하세요.

### `get-query-execution`
<a name="athena_GetQueryExecution_cli_2_topic"></a>

다음 코드 예시는 `get-query-execution`의 사용 방법을 보여줍니다.

**AWS CLI**  
**쿼리 실행에 대한 정보를 반환하는 방법**  
다음 `get-query-execution` 예제에서는 지정된 쿼리 ID가 있는 쿼리에 대한 정보를 반환합니다.  

```
aws athena get-query-execution \
    --query-execution-id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
```
출력:  

```
{
    "QueryExecution": {
        "QueryExecutionId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
        "Query": "select date, location, browser, uri, status from cloudfront_logs where method = 'GET
' and status = 200 and location like 'SFO%' limit 10",
        "StatementType": "DML",
        "ResultConfiguration": {
            "OutputLocation": "s3://amzn-s3-demo-bucket/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111.csv"
        },
        "QueryExecutionContext": {
            "Database": "mydatabase",
            "Catalog": "awsdatacatalog"
        },
        "Status": {
            "State": "SUCCEEDED",
            "SubmissionDateTime": 1593469842.665,
            "CompletionDateTime": 1593469846.486
        },
        "Statistics": {
            "EngineExecutionTimeInMillis": 3600,
            "DataScannedInBytes": 203089,
            "TotalExecutionTimeInMillis": 3821,
            "QueryQueueTimeInMillis": 267,
            "QueryPlanningTimeInMillis": 1175
        },
        "WorkGroup": "AthenaAdmin"
    }
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [Amazon Athena를 사용하여 SQL 쿼리 실행](https://docs.aws.amazon.com/athena/latest/ug/querying-athena-tables.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetQueryExecution](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/get-query-execution.html)을 참조하세요.

### `get-query-results`
<a name="athena_GetQueryResults_cli_2_topic"></a>

다음 코드 예시는 `get-query-results`의 사용 방법을 보여줍니다.

**AWS CLI**  
**쿼리 결과를 반환하는 방법**  
다음 `get-query-results` 예제에서는 지정된 쿼리 ID가 있는 쿼리의 결과를 반환합니다.  

```
aws athena get-query-results \
    --query-execution-id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
```
출력:  

```
{
    "ResultSet": {
        "Rows": [
            {
                "Data": [
                    {
                        "VarCharValue": "date"
                    },
                    {
                        "VarCharValue": "location"
                    },
                    {
                        "VarCharValue": "browser"
                    },
                    {
                        "VarCharValue": "uri"
                    },
                    {
                        "VarCharValue": "status"
                    }
                ]
            },
            {
                "Data": [
                    {
                        "VarCharValue": "2014-07-05"
                    },
                    {
                        "VarCharValue": "SFO4"
                    },
                    {
                        "VarCharValue": "Safari"
                    },
                    {
                        "VarCharValue": "/test-image-2.jpeg"
                    },
                    {
                        "VarCharValue": "200"
                    }
                ]
            },
            {
                "Data": [
                    {
                        "VarCharValue": "2014-07-05"
                    },
                    {
                        "VarCharValue": "SFO4"
                    },
                    {
                        "VarCharValue": "Opera"
                    },
                    {
                        "VarCharValue": "/test-image-2.jpeg"
                    },
                    {
                        "VarCharValue": "200"
                    }
                ]
            },
            {
                "Data": [
                    {
                        "VarCharValue": "2014-07-05"
                    },
                    {
                        "VarCharValue": "SFO4"
                    },
                    {
                        "VarCharValue": "Firefox"
                    },
                    {
                        "VarCharValue": "/test-image-3.jpeg"
                    },
                    {
                        "VarCharValue": "200"
                    }
                ]
            },
            {
                "Data": [
                    {
                        "VarCharValue": "2014-07-05"
                    },
                    {
                        "VarCharValue": "SFO4"
                    },
                    {
                        "VarCharValue": "Lynx"
                    },
                    {
                        "VarCharValue": "/test-image-3.jpeg"
                    },
                    {
                        "VarCharValue": "200"
                    }
                ]
            },
            {
                "Data": [
                    {
                        "VarCharValue": "2014-07-05"
                    },
                    {
                        "VarCharValue": "SFO4"
                    },
                    {
                        "VarCharValue": "IE"
                    },
                    {
                        "VarCharValue": "/test-image-2.jpeg"
                    },
                    {
                        "VarCharValue": "200"
                    }
                ]
            },
            {
                "Data": [
                    {
                        "VarCharValue": "2014-07-05"
                    },
                    {
                        "VarCharValue": "SFO4"
                    },
                    {
                        "VarCharValue": "Opera"
                    },
                    {
                        "VarCharValue": "/test-image-1.jpeg"
                    },
                    {
                        "VarCharValue": "200"
                    }
                ]
            },
            {
                "Data": [
                    {
                        "VarCharValue": "2014-07-05"
                    },
                    {
                        "VarCharValue": "SFO4"
                    },
                    {
                        "VarCharValue": "Chrome"
                    },
                    {
                        "VarCharValue": "/test-image-3.jpeg"
                    },
                    {
                        "VarCharValue": "200"
                    }
                ]
            },
            {
                "Data": [
                    {
                        "VarCharValue": "2014-07-05"
                    },
                    {
                        "VarCharValue": "SFO4"
                    },
                    {
                        "VarCharValue": "Firefox"
                    },
                    {
                        "VarCharValue": "/test-image-2.jpeg"
                    },
                    {
                        "VarCharValue": "200"
                    }
                ]
            },
            {
                "Data": [
                    {
                        "VarCharValue": "2014-07-05"
                    },
                    {
                        "VarCharValue": "SFO4"
                    },
                    {
                        "VarCharValue": "Chrome"
                    },
                    {
                        "VarCharValue": "/test-image-3.jpeg"
                    },
                    {
                        "VarCharValue": "200"
                    }
                ]
            },
            {
                "Data": [
                    {
                        "VarCharValue": "2014-07-05"
                    },
                    {
                        "VarCharValue": "SFO4"
                    },
                    {
                        "VarCharValue": "IE"
                    },
                    {
                        "VarCharValue": "/test-image-2.jpeg"
                    },
                    {
                        "VarCharValue": "200"
                    }
                ]
            }
        ],
        "ResultSetMetadata": {
            "ColumnInfo": [
                {
                    "CatalogName": "hive",
                    "SchemaName": "",
                    "TableName": "",
                    "Name": "date",
                    "Label": "date",
                    "Type": "date",
                    "Precision": 0,
                    "Scale": 0,
                    "Nullable": "UNKNOWN",
                    "CaseSensitive": false
                },
                {
                    "CatalogName": "hive",
                    "SchemaName": "",
                    "TableName": "",
                    "Name": "location",
                    "Label": "location",
                    "Type": "varchar",
                    "Precision": 2147483647,
                "Data": [

                    "Scale": 0,
                    "Nullable": "UNKNOWN",
                    "CaseSensitive": true
                },
                {
                    "CatalogName": "hive",
                    "SchemaName": "",
                    "TableName": "",
                    "Name": "browser",
                    "Label": "browser",
                    "Type": "varchar",
                    "Precision": 2147483647,
                    "Scale": 0,
                    "Nullable": "UNKNOWN",
                    "CaseSensitive": true
                },
                {
                    "CatalogName": "hive",
                    "SchemaName": "",
                    "TableName": "",
                    "Name": "uri",
                    "Label": "uri",
                    "Type": "varchar",
                    "Precision": 2147483647,
                    "Scale": 0,
                    "Nullable": "UNKNOWN",
                    "CaseSensitive": true
                },
                {
                    "CatalogName": "hive",
                    "SchemaName": "",
                    "TableName": "",
                    "Name": "status",
                    "Label": "status",
                    "Type": "integer",
                    "Precision": 10,
                    "Scale": 0,
                    "Nullable": "UNKNOWN",
                    "CaseSensitive": false
                }
            ]
        }
    },
    "UpdateCount": 0
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [쿼리 결과, 출력 파일 및 쿼리 기록 작업](https://docs.aws.amazon.com/athena/latest/ug/querying.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetQueryResults](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/get-query-results.html)를 참조하세요.

### `get-table-metadata`
<a name="athena_GetTableMetadata_cli_2_topic"></a>

다음 코드 예시는 `get-table-metadata`의 사용 방법을 보여줍니다.

**AWS CLI**  
**테이블에 대한 메타데이터 정보를 반환하는 방법**  
다음 `get-table-metadata` 예제에서는 열 이름 및 해당 데이터 유형을 포함하는 `counties` 테이블에 대한 메타데이터 정보를 `AwsDataCatalog` 데이터 카탈로그의 `sampledb` 데이터베이스에서 반환합니다.  

```
aws athena get-table-metadata \
    --catalog-name AwsDataCatalog \
    --database-name sampledb \
    --table-name counties
```
출력:  

```
{
    "TableMetadata": {
        "Name": "counties",
        "CreateTime": 1593559968.0,
        "LastAccessTime": 0.0,
        "TableType": "EXTERNAL_TABLE",
        "Columns": [
            {
                "Name": "name",
                "Type": "string",
                "Comment": "from deserializer"
            },
            {
                "Name": "boundaryshape",
                "Type": "binary",
                "Comment": "from deserializer"
            },
            {
                "Name": "motto",
                "Type": "string",
                "Comment": "from deserializer"
            },
            {
                "Name": "population",
                "Type": "int",
                "Comment": "from deserializer"
            }
        ],
        "PartitionKeys": [],
        "Parameters": {
            "EXTERNAL": "TRUE",
            "inputformat": "com.esri.json.hadoop.EnclosedJsonInputFormat",
            "location": "s3://amzn-s3-demo-bucket/json",
            "outputformat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat",
            "serde.param.serialization.format": "1",
            "serde.serialization.lib": "com.esri.hadoop.hive.serde.JsonSerde",
            "transient_lastDdlTime": "1593559968"
        }
    }
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [테이블 세부 정보 표시: get-table-metadata](https://docs.aws.amazon.com/athena/latest/ug/datastores-hive-cli.html#datastores-hive-cli-showing-details-of-a-table)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetTableMetadata](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/get-table-metadata.html)를 참조하세요.

### `get-work-group`
<a name="athena_GetWorkGroup_cli_2_topic"></a>

다음 코드 예시는 `get-work-group`의 사용 방법을 보여줍니다.

**AWS CLI**  
**작업 그룹에 대한 정보를 반환하는 방법**  
다음 `get-work-group` 예제에서는 `AthenaAdmin` 작업 그룹에 대한 정보를 반환합니다.  

```
aws athena get-work-group \
    --work-group AthenaAdmin
```
출력:  

```
{
    "WorkGroup": {
        "Name": "AthenaAdmin",
        "State": "ENABLED",
        "Configuration": {
            "ResultConfiguration": {
                "OutputLocation": "s3://amzn-s3-demo-bucket/"
            },
            "EnforceWorkGroupConfiguration": false,
            "PublishCloudWatchMetricsEnabled": true,
            "RequesterPaysEnabled": false
        },
        "Description": "Workgroup for Athena administrators",
        "CreationTime": 1573677174.105
    }
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [작업 그룹 관리](https://docs.aws.amazon.com/athena/latest/ug/workgroups-create-update-delete.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [GetWorkGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/get-work-group.html)을 참조하세요.

### `list-data-catalogs`
<a name="athena_ListDataCatalogs_cli_2_topic"></a>

다음 코드 예시는 `list-data-catalogs`의 사용 방법을 보여줍니다.

**AWS CLI**  
**Athena에 등록된 데이터 카탈로그를 나열하는 방법**  
다음 `list-data-catalogs` 예제에서는 Athena에 등록된 데이터 카탈로그를 나열합니다.  

```
aws athena list-data-catalogs
```
출력:  

```
{
    "DataCatalogsSummary": [
        {
            "CatalogName": "AwsDataCatalog",
            "Type": "GLUE"
        },
        {
            "CatalogName": "cw_logs_catalog",
            "Type": "LAMBDA"
        },
        {
            "CatalogName": "cw_metrics_catalog",
            "Type": "LAMBDA"
        }
    ]
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [등록된 카탈로그 나열: list-data-catalogs](https://docs.aws.amazon.com/athena/latest/ug/datastores-hive-cli.html#datastores-hive-cli-listing-registered-catalogs)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListDataCatalogs](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/list-data-catalogs.html)를 참조하세요.

### `list-databases`
<a name="athena_ListDatabases_cli_2_topic"></a>

다음 코드 예시는 `list-databases`의 사용 방법을 보여줍니다.

**AWS CLI**  
**데이터 카탈로그의 데이터베이스를 나열하는 방법**  
다음 `list-databases` 예제에서는 `AwsDataCatalog` 데이터 카탈로그의 데이터베이스를 나열합니다.  

```
aws athena list-databases \
    --catalog-name AwsDataCatalog
```
출력:  

```
{
    "DatabaseList": [
        {
            "Name": "default"
        },
        {
            "Name": "mydatabase"
        },
        {
            "Name": "newdb"
        },
        {
            "Name": "sampledb",
            "Description": "Sample database",
            "Parameters": {
                "CreatedBy": "Athena",
                "EXTERNAL": "TRUE"
            }
        },
        {
            "Name": "webdata"
        }
    ]
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [카탈로그의 데이터베이스 나열: list-databases](https://docs.aws.amazon.com/athena/latest/ug/datastores-hive-cli.html#datastores-hive-cli-listing-databases)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListDatabases](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/list-databases.html)를 참조하세요.

### `list-named-queries`
<a name="athena_ListNamedQueries_cli_2_topic"></a>

다음 코드 예시는 `list-named-queries`의 사용 방법을 보여줍니다.

**AWS CLI**  
**작업 그룹에 대한 명명된 쿼리를 나열하는 방법**  
다음 `list-named-queries` 예제에서는 `AthenaAdmin` 작업 그룹에 대한 명명된 쿼리를 나열합니다.  

```
aws athena list-named-queries \
    --work-group AthenaAdmin
```
출력:  

```
{
    "NamedQueryIds": [
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333"
    ]
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [Amazon Athena를 사용하여 SQL 쿼리 실행](https://docs.aws.amazon.com/athena/latest/ug/querying-athena-tables.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListNamedQueries](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/list-named-queries.html)를 참조하세요.

### `list-query-executions`
<a name="athena_ListQueryExecutions_cli_2_topic"></a>

다음 코드 예시는 `list-query-executions`의 사용 방법을 보여줍니다.

**AWS CLI**  
**지정된 작업 그룹에서 쿼리의 쿼리 ID를 나열하는 방법**  
다음 `list-query-executions` 예제에서는 `AthenaAdmin` 작업 그룹의 쿼리 ID를 최대 열 개까지 나열합니다.  

```
aws athena list-query-executions \
    --work-group AthenaAdmin \
    --max-items 10
```
출력:  

```
{
    "QueryExecutionIds": [
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE11110",
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333",
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE11114",
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE11115",
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE11116",
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE11117",
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE11118",
        "a1b2c3d4-5678-90ab-cdef-EXAMPLE11119"
    ],
    "NextToken": "eyJOZXh0VG9rZW4iOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAxMH0="
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [쿼리 결과, 출력 파일 및 쿼리 기록 작업](https://docs.aws.amazon.com/athena/latest/ug/querying.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListQueryExecutions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/list-query-executions.html)를 참조하세요.

### `list-table-metadata`
<a name="athena_ListTableMetadata_cli_2_topic"></a>

다음 코드 예시는 `list-table-metadata`의 사용 방법을 보여줍니다.

**AWS CLI**  
**데이터 카탈로그의 지정된 데이터베이스에서 테이블에 대한 메타데이터를 나열하는 방법**  
다음 `list-table-metadata` 예제에서는 `AwsDataCatalog` 데이터 카탈로그의 `geography` 데이터베이스에서 최대 두 개의 테이블에 대한 메타데이터 정보를 반환합니다.  

```
aws athena list-table-metadata \
    --catalog-name AwsDataCatalog \
    --database-name geography \
    --max-items 2
```
출력:  

```
{
    "TableMetadataList": [
        {
            "Name": "country_codes",
            "CreateTime": 1586553454.0,
            "TableType": "EXTERNAL_TABLE",
            "Columns": [
                {
                    "Name": "country",
                    "Type": "string",
                    "Comment": "geo id"
                },
                {
                    "Name": "alpha-2 code",
                    "Type": "string",
                    "Comment": "geo id2"
                },
                {
                    "Name": "alpha-3 code",
                    "Type": "string",
                    "Comment": "state name"
                },
                {
                    "Name": "numeric code",
                    "Type": "bigint",
                    "Comment": ""
                },
                {
                    "Name": "latitude",
                    "Type": "bigint",
                    "Comment": "location (latitude)"
                },
                {
                    "Name": "longitude",
                    "Type": "bigint",
                    "Comment": "location (longitude)"
                }
            ],
            "Parameters": {
                "areColumnsQuoted": "false",
                "classification": "csv",
                "columnsOrdered": "true",
                "delimiter": ",",
                "has_encrypted_data": "false",
                "inputformat": "org.apache.hadoop.mapred.TextInputFormat",
                "location": "s3://amzn-s3-demo-bucket/csv/countrycode",
                "outputformat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat",
                "serde.param.field.delim": ",",
                "serde.serialization.lib": "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe",
                "skip.header.line.count": "1",
                "typeOfData": "file"
            }
        },
        {
            "Name": "county_populations",
            "CreateTime": 1586553446.0,
            "TableType": "EXTERNAL_TABLE",
            "Columns": [
                {
                    "Name": "id",
                    "Type": "string",
                    "Comment": "geo id"
                },
                {
                    "Name": "country",

                    "Name": "id2",
                    "Type": "string",
                    "Comment": "geo id2"
                },
                {
                    "Name": "county",
                    "Type": "string",
                    "Comment": "county name"
                },
                {
                    "Name": "state",
                    "Type": "string",
                    "Comment": "state name"
                },
                {
                    "Name": "population estimate 2018",
                    "Type": "string",
                    "Comment": ""
                }
            ],
            "Parameters": {
                "areColumnsQuoted": "false",
                "classification": "csv",
                "columnsOrdered": "true",
                "delimiter": ",",
                "has_encrypted_data": "false",
                "inputformat": "org.apache.hadoop.mapred.TextInputFormat",
                "location": "s3://amzn-s3-demo-bucket/csv/CountyPopulation",
                "outputformat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat",
                "serde.param.field.delim": ",",
                "serde.serialization.lib": "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe",
                "skip.header.line.count": "1",
                "typeOfData": "file"
            }
        }
    ],
    "NextToken": "eyJOZXh0VG9rZW4iOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAyfQ=="
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [데이터베이스의 모든 테이블에 대한 메타데이터 표시: list-table-metadata](https://docs.aws.amazon.com/athena/latest/ug/datastores-hive-cli.html#datastores-hive-cli-showing-all-table-metadata)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListTableMetadata](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/list-table-metadata.html)를 참조하세요.

### `list-tags-for-resource`
<a name="athena_ListTagsForResource_cli_2_topic"></a>

다음 코드 예시는 `list-tags-for-resource`의 사용 방법을 보여줍니다.

**AWS CLI**  
**예제 1: 작업 그룹에 대한 태그를 나열하는 방법**  
다음 `list-tags-for-resource` 예제에서는 `Data_Analyst_Group` 작업 그룹에 대한 태그를 나열합니다.  

```
aws athena list-tags-for-resource \
    --resource-arn arn:aws:athena:us-west-2:111122223333:workgroup/Data_Analyst_Group
```
출력:  

```
{
    "Tags": [
        {
            "Key": "Division",
            "Value": "West"
        },
        {
            "Key": "Team",
            "Value": "Big Data"
        },
        {
            "Key": "Location",
            "Value": "Seattle"
        }
    ]
}
```
**예제 2: 데이터 카탈로그에 대한 태그를 나열하는 방법**  
다음 `list-tags-for-resource` 예제에서는 `dynamo_db_catalog` 데이터 카탈로그에 대한 태그를 나열합니다.  

```
aws athena list-tags-for-resource \
    --resource-arn arn:aws:athena:us-west-2:111122223333:datacatalog/dynamo_db_catalog
```
출력:  

```
{
    "Tags": [
        {
            "Key": "Division",
            "Value": "Mountain"
        },
        {
            "Key": "Organization",
            "Value": "Retail"
        },
        {
            "Key": "Product_Line",
            "Value": "Shoes"
        },
        {
            "Key": "Location",
            "Value": "Denver"
        }
    ]
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [리소스에 대한 태그 나열: list-tags-for-resource](https://docs.aws.amazon.com/athena/latest/ug/tags-operations.html#tags-operations-examples-cli-list-tags-for-resource)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListTagsForResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/list-tags-for-resource.html)를 참조하세요.

### `list-work-groups`
<a name="athena_ListWorkGroups_cli_2_topic"></a>

다음 코드 예시는 `list-work-groups`의 사용 방법을 보여줍니다.

**AWS CLI**  
**작업 그룹을 나열하는 방법**  
다음 `list-work-groups` 예제에서는 현재 계정에서 작업 그룹을 나열합니다.  

```
aws athena list-work-groups
```
출력:  

```
{
    "WorkGroups": [
        {
            "Name": "Data_Analyst_Group",
            "State": "ENABLED",
            "Description": "",
            "CreationTime": 1578006683.016
        },
        {
            "Name": "AthenaAdmin",
            "State": "ENABLED",
            "Description": "",
            "CreationTime": 1573677174.105
        },
        {
            "Name": "primary",
            "State": "ENABLED",
            "Description": "",
            "CreationTime": 1567465222.723
        }
    ]
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [작업 그룹 관리](https://docs.aws.amazon.com/athena/latest/ug/workgroups-create-update-delete.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListWorkGroups](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/list-work-groups.html)를 참조하세요.

### `start-query-execution`
<a name="athena_StartQueryExecution_cli_2_topic"></a>

다음 코드 예시는 `start-query-execution`의 사용 방법을 보여줍니다.

**AWS CLI**  
**예제 1: 지정된 데이터베이스 및 데이터 카탈로그 내 지정된 테이블에 있는 작업 그룹에서 쿼리를 실행하는 방법**  
다음 `start-query-execution` 예제에서는 `AthenaAdmin` 작업 그룹을 사용하여 `AwsDataCatalog` 데이터 카탈로그 내 `cflogsdatabase`의 `cloudfront_logs` 테이블에서 쿼리를 실행합니다.  

```
aws athena start-query-execution \
    --query-string "select date, location, browser, uri, status from cloudfront_logs where method = 'GET' and status = 200 and location like 'SFO%' limit 10" \
    --work-group "AthenaAdmin" \
    --query-execution-context Database=cflogsdatabase,Catalog=AwsDataCatalog
```
출력:  

```
{
"QueryExecutionId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [Amazon Athena를 사용하여 SQL 쿼리 실행](https://docs.aws.amazon.com/athena/latest/ug/querying-athena-tables.html)을 참조하세요.  
**예제 2: 지정된 작업 그룹을 사용하여 지정된 데이터 카탈로그에서 데이터베이스를 생성하는 쿼리를 실행하는 방법**  
다음 `start-query-execution` 예제에서는 `AthenaAdmin` 작업 그룹을 사용하여 기본 데이터 카탈로그 `AwsDataCatalog`에서 `newdb` 데이터베이스를 생성합니다.  

```
aws athena start-query-execution \
    --query-string "create database if not exists newdb" \
    --work-group "AthenaAdmin"
```
출력:  

```
{
"QueryExecutionId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11112"
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [Amazon Athena를 사용하여 SQL 쿼리 실행](https://docs.aws.amazon.com/athena/latest/ug/querying-athena-tables.html)을 참조하세요.  
**예제 3: 지정된 데이터베이스 및 데이터 카탈로그 내 테이블에서 뷰를 생성하는 쿼리를 실행하는 방법**  
다음 `start-query-execution` 예제에서는 `SELECT` 문을 사용하여 `cflogsdatabase` 내 `cloudfront_logs` 테이블에서 `cf10` 뷰를 생성합니다.  

```
aws athena start-query-execution \
    --query-string  "CREATE OR REPLACE VIEW cf10 AS SELECT * FROM cloudfront_logs limit 10" \
    --query-execution-context Database=cflogsdatabase
```
출력:  

```
{
"QueryExecutionId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11113"
}
```
자세한 내용은 *Amazon Athena 사용 설명서*의 [Amazon Athena를 사용하여 SQL 쿼리 실행](https://docs.aws.amazon.com/athena/latest/ug/querying-athena-tables.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [StartQueryExecution](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/start-query-execution.html)을 참조하세요.

### `stop-query-execution`
<a name="athena_StopQueryExecution_cli_2_topic"></a>

다음 코드 예시는 `stop-query-execution`의 사용 방법을 보여줍니다.

**AWS CLI**  
**실행 중인 쿼리를 중지하는 방법**  
다음 `stop-query-execution` 예제에서는 지정된 쿼리 ID가 있는 쿼리를 중지합니다.  

```
aws athena stop-query-execution \
    --query-execution-id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
```
이 명령은 출력을 생성하지 않습니다.  
자세한 내용은 *Amazon Athena 사용 설명서*의 [Amazon Athena를 사용하여 SQL 쿼리 실행](https://docs.aws.amazon.com/athena/latest/ug/querying-athena-tables.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [StopQueryExecution](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/stop-query-execution.html)을 참조하세요.

### `tag-resource`
<a name="athena_TagResource_cli_2_topic"></a>

다음 코드 예시는 `tag-resource`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리소스에 태그를 추가하는 방법**  
다음 `tag-resource` 예제에서는 `dynamo_db_catalog` 데이터 카탈로그에 태그 세 개를 추가합니다.  

```
aws athena tag-resource \
    --resource-arn arn:aws:athena:us-west-2:111122223333:datacatalog/dynamo_db_catalog \
    --tags Key=Organization,Value=Retail Key=Division,Value=Mountain Key=Product_Line,Value=Shoes Key=Location,Value=Denver
```
이 명령은 출력을 생성하지 않습니다. 결과를 보려면 `aws athena list-tags-for-resource --resource-arn arn:aws:athena:us-west-2:111122223333:datacatalog/dynamo_db_catalog`를 사용합니다.  
자세한 내용은 *Amazon Athena 사용 설명서*의 [리소스에 태그 추가: tag-resource](https://docs.aws.amazon.com/athena/latest/ug/tags-operations.html#tags-operations-examples-cli-tag-resource)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [TagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/tag-resource.html)를 참조하세요.

### `untag-resource`
<a name="athena_UntagResource_cli_2_topic"></a>

다음 코드 예시에서는 `untag-resource`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리소스에서 태그를 제거하는 방법**  
다음 `untag-resource` 예제에서는 `Specialization` 및 `Focus` 키와 해당 관련 값들을 `dynamo_db_catalog` 데이터 카탈로그 리소스에서 제거합니다.  

```
aws athena untag-resource \
    --resource-arn arn:aws:athena:us-west-2:111122223333:datacatalog/dynamo_db_catalog \
    --tag-keys Specialization Focus
```
이 명령은 출력을 생성하지 않습니다. 결과를 보려면 `list-tags-for-resource` 명령을 사용합니다.  
자세한 내용은 *Amazon Athena 사용 설명서*의 [리소스에서 태그 제거: untag-resource](https://docs.aws.amazon.com/athena/latest/ug/tags-operations.html#tags-operations-examples-cli-untag-resource)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UntagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/untag-resource.html)를 참조하세요.

### `update-data-catalog`
<a name="athena_UpdateDataCatalog_cli_2_topic"></a>

다음 코드 예시는 `update-data-catalog`의 사용 방법을 보여줍니다.

**AWS CLI**  
**데이터 카탈로그를 업데이트하는 방법**  
다음 `update-data-catalog` 예제에서는 `cw_logs_catalog` 데이터 카탈로그의 Lambda 함수와 설명을 업데이트합니다.  

```
aws athena update-data-catalog \
    --name cw_logs_catalog \
    --type LAMBDA \
    --description "New CloudWatch Logs Catalog" \
    --function=arn:aws:lambda:us-west-2:111122223333:function:new_cw_logs_lambda
```
이 명령은 출력을 생성하지 않습니다. 결과를 보려면 `aws athena get-data-catalog --name cw_logs_catalog`를 사용합니다.  
자세한 내용은 *Amazon Athena 사용 설명서*의 [카탈로그 업데이트: update-data-catalog](https://docs.aws.amazon.com/athena/latest/ug/datastores-hive-cli.html#datastores-hive-cli-updating-a-catalog)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateDataCatalog](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/update-data-catalog.html)를 참조하세요.

### `update-work-group`
<a name="athena_UpdateWorkGroup_cli_2_topic"></a>

다음 코드 예시는 `update-work-group`의 사용 방법을 보여줍니다.

**AWS CLI**  
**작업 그룹을 업데이트하는 방법**  
다음 `update-work-group` 예제에서는 `Data_Analyst_Group` 작업 그룹을 비활성화합니다. 사용자는 비활성화된 작업 그룹에서 쿼리를 실행하거나 생성할 수 없지만 여전히 지표, 데이터 사용량 제한 제어, 작업 그룹 설정, 쿼리 기록 및 저장된 쿼리를 볼 수 있습니다.  

```
aws athena update-work-group \
    --work-group Data_Analyst_Group \
    --state DISABLED
```
이 명령은 출력을 생성하지 않습니다. 상태 변화를 확인하려면 `aws athena get-work-group --work-group Data_Analyst_Group`을 사용하고 출력에서 `State` 속성을 확인합니다.  
자세한 내용은 *Amazon Athena 사용 설명서*의 [작업 그룹 관리](https://docs.aws.amazon.com/athena/latest/ug/workgroups-create-update-delete.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateWorkGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/athena/update-work-group.html)을 참조하세요.