

# Domo 엔터티에서 읽기
<a name="domo-reading-from-entities"></a>

**사전 조건**

읽으려는 Domo 객체. 객체 이름(예: Data Set 또는 Data Permission Policies)이 필요합니다. 다음 표에는 지원되는 엔터티가 나와 있습니다.

**소스에 대해 지원되는 엔터티**:


| 개체 | 필터링 가능 | 제한 지원 | 정렬 기준 지원 | Select \$1 지원 | 분할 지원 | 
| --- | --- | --- | --- | --- | --- | 
| 데이터 세트 | 예 | 예 | 예 | 예 | 예 | 
| Data Permission Policies | 아니요 | 아니요 | 아니요 | 예 | 아니요 | 

**예시:**

```
Domo_read = glueContext.create_dynamic_frame.from_options(
    connection_type="domo",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "dataset",
        "API_VERSION": "v1"
    }
```

## Domo 엔터티 및 필드 세부 정보
<a name="domo-reading-from-entities-field-details"></a>

정적 메타데이터를 포함하는 엔터티:

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/glue/latest/dg/domo-reading-from-entities.html)

다음 엔터티에 대해 Domo에서는 메타데이터를 동적으로 가져도록 엔드포인트를 제공하므로 운영자 지원이 엔터티의 데이터 유형 수준에서 캡처됩니다.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/glue/latest/dg/domo-reading-from-entities.html)

## 분할 쿼리
<a name="domo-reading-from-partitioning"></a>

**필드 기반 분할**

Spark에서 동시성을 활용하려는 경우 추가 Spark 옵션(`PARTITION_FIELD`, `LOWER_BOUND`, `UPPER_BOUND`, `NUM_PARTITIONS`)을 제공할 수 있습니다. 이러한 파라미터를 사용하면 Spark 작업에서 동시에 실행할 수 있는 `NUM_PARTITIONS`개의 하위 쿼리로 원래 쿼리가 분할됩니다.
+ `PARTITION_FIELD`: 쿼리 분할에 사용할 필드의 이름입니다.
+ `LOWER_BOUND`: 선택한 파티션 필드의 하한 값(**경계 포함**).

  DateTime 필드의 경우 ISO 형식의 값이 허용됩니다.

  유효한 값의 예제:

  ```
  "2023-01-15T11:18:39.205Z"
  ```

  Date 필드의 경우 ISO 형식의 값이 허용됩니다.

  유효한 값의 예제:

  ```
  "2023-01-15"
  ```
+ `UPPER_BOUND`: 선택한 파티션 필드의 상한 값(**경계 제외**).

  유효한 값의 예제:

  ```
  "2023-02-15T11:18:39.205Z"
  ```
+ `NUM_PARTITIONS`: 파티션 수.

엔터티 수준 분할 필드 지원 세부 정보는 다음 표에 나와 있습니다.

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/glue/latest/dg/domo-reading-from-entities.html)

예시:

```
Domo_read = glueContext.create_dynamic_frame.from_options(
    connection_type="domo",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "dataset",
        "API_VERSION": "v1",
        "PARTITION_FIELD": "permissionTime"
        "LOWER_BOUND": "2023-01-15T11:18:39.205Z"
        "UPPER_BOUND": "2023-02-15T11:18:39.205Z"
        "NUM_PARTITIONS": "2"
    }
```

**레코드 기반 분할**

Spark에서 동시성을 활용하려는 경우 추가 Spark 옵션(`NUM_PARTITIONS`)을 제공할 수 있습니다. 이 파라미터를 사용하면 Spark 태스크에서 동시에 실행할 수 있는 `NUM_PARTITIONS`개의 하위 쿼리로 원본 쿼리가 분할됩니다.

레코드 기반 분할에서는 존재하는 총 레코드 수를 Domo에서 쿼리하고 제공된 `NUM_PARTITIONS` 수로 나눕니다. 그런 다음, 결과 레코드 수를 각 하위 쿼리에서 동시에 가져옵니다.

예시:

```
Domo_read = glueContext.create_dynamic_frame.from_options(
    connection_type="domo",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "dataset",
        "API_VERSION": "v1",
        "NUM_PARTITIONS": "2"
    }
```