

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

**사전 조건**

읽으려는 Freshsales 객체입니다. 객체 이름이 필요합니다.

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


| 개체 | 필터링 가능 | 제한 지원 | 정렬 기준 지원 | Select \$1 지원 | 분할 지원 | 
| --- | --- | --- | --- | --- | --- | 
| Accounts | 예 | 예 | 예 | 예 | 예 | 
| Contacts | 예 | 예 | 예 | 예 | 예 | 

**예시:**

```
freshSales_read = glueContext.create_dynamic_frame.from_options(
     connection_type="freshsales",
     connection_options={
         "connectionName": "connectionName",
         "ENTITY_NAME": "entityName",
         "API_VERSION": "v1.0"
     }
```

**Freshsales 엔터티 및 필드 세부 정보**:

Freshsales에서는 지원되는 엔터티에 대해 메타데이터를 동적으로 가져오도록 엔드포인트를 제공합니다. 따라서 운영자 지원은 데이터 유형 수준에서 캡처됩니다.

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

## 분할 쿼리
<a name="freshsales-reading-partitioning-queries"></a>

**필터 기반 분할**:

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

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

  유효한 값의 예제:

  ```
  "2024-09-30T01:01:01.000Z"
  ```
+ `UPPER_BOUND`: 선택한 파티션 필드의 상한 값(**경계 제외**).
+ `NUM_PARTITIONS`: 파티션 수.

예시:

```
freshSales_read = glueContext.create_dynamic_frame.from_options(
     connection_type="freshsales",
     connection_options={
         "connectionName": "connectionName",
         "ENTITY_NAME": "entityName",
         "API_VERSION": "v1",
         "PARTITION_FIELD": "Created_Time"
         "LOWER_BOUND": " 2024-10-15T21:16:25Z"
         "UPPER_BOUND": " 2024-10-20T21:25:50Z"
         "NUM_PARTITIONS": "10"
     }
```