

# Google Sheets 엔터티에서 읽기
<a name="googlesheets-reading-from-entities"></a>

 **사전 조건** 
+  읽으려는 Google SpreadSheet입니다. 스프레드시트의 SpreadSheet ID 및 tabName이 필요합니다.

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


| 개체 | 데이터 형식 | 지원되는 연산자 | 
| --- | --- | --- | 
| 스프레드시트 | String | N/A(필터링이 지원되지 않음) | 

 **예제** 

```
googleSheets_read = glueContext.create_dynamic_frame.from_options(
    connection_type="googlesheets",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "{SpreadSheetID}#{SheetTabName}",
        "API_VERSION": "v4"
    }
```

 **분할 쿼리** 

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

 **`NUM_PARTITIONS`를 사용한 예** 

```
googlesheets_read = glueContext.create_dynamic_frame.from_options(
    connection_type="googlesheets",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "{SpreadSheetID}#{SheetTabName}",
        "API_VERSION": "v4",
        "NUM_PARTITIONS": "10"
    }
```