

# Twilio エンティティからの読み取り
<a name="twilio-reading-from-entities"></a>

**前提条件**

読み取り元の Twilio オブジェクト。`SMS-Message` または `SMS-CountryPricing` などのオブジェクト名が必要です。

**ソースに対応するエンティティ**:


| エンティティ | インターフェイス | フィルタリング可能 | 制限をサポートする | Order By をサポートする | Select \$1 をサポートする | パーティション分割をサポートする | 
| --- | --- | --- | --- | --- | --- | --- | 
| SMS-Message | REST | はい | あり | なし | あり | あり | 
| SMS-CountryPricing | REST | なし | なし | なし | あり | なし | 
| Voice-Call | REST | はい | あり | なし | あり | なし | 
| Voice-Application | REST | はい | あり | なし | あり | なし | 
| Voice-OutgoingCallerID | REST | はい | あり | なし | あり | なし | 
| Voice-Queue | REST | はい | あり | なし | あり | なし | 
| Conversations-Conversation | REST | はい | あり | なし | あり | なし | 
| Conversations-User | REST | なし | あり | なし | あり | なし | 
| Conversations-Role | REST | なし | あり | なし | あり | なし | 
| Conversations-Configuration | REST | なし | なし | なし | あり | なし | 
| Conversations-AddressConfiguration | REST | はい | あり | なし | あり | なし | 
| Conversations-WebhookConfiguration | REST | なし | なし | なし | あり | なし | 
| Conversations-ParticipantConversation | REST | なし | なし | なし | あり | なし | 
| Conversations-Credential | REST | なし | あり | なし | あり | なし | 
| Conversations-ConversationService | REST | なし | あり | なし | あり | なし | 

**例**:

```
twilio_read = glueContext.create_dynamic_frame.from_options(
    connection_type="twilio",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "sms-message",
        "API_VERSION": "2010-04-01",
        "Edge_Location": "sydney.us1"
    }
```

**Twilio エンティティとフィールドの詳細**:

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

## パーティショニングクエリ
<a name="twilio-reading-partitioning-queries"></a>

**パーティション分割をサポートするフィールド**:

Twilio では、DateTime データ型フィールドはフィールドベースのパーティシン分割をサポートしています。

Spark で同時実行を使用する場合は、追加の Spark オプション `PARTITION_FIELD`、`LOWER_BOUND`、`UPPER_BOUND`、および `NUM_PARTITIONS` を指定できます。これらのパラメータを使用すると、元のクエリは Spark タスクで同時に実行できるサブクエリの `NUM_PARTITIONS` の数に分割されます。
+ `PARTITION_FIELD`: クエリのパーティション化に使用するフィールドの名前。
+ `LOWER_BOUND`: 選択したパーティションフィールドの**包括的な**下限値。

  Datetime フィールドでは、Spark SQL クエリで使用される Spark タイムスタンプ形式を受け入れます。

  有効な値の例は次のとおりです:

  ```
  "2024-05-01T20:55:02.000Z"
  ```
+ `UPPER_BOUND`: 選択したパーティションフィールドの**排他的**上限値。
+ `NUM_PARTITIONS`: パーティション数。

例:

```
twilio_read = glueContext.create_dynamic_frame.from_options(
    connection_type="twilio",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "sms-message",
        "API_VERSION": "2010-04-01",
        "PARTITION_FIELD": "date_sent"
        "LOWER_BOUND": "2024-05-01T20:55:02.000Z"
        "UPPER_BOUND": "2024-06-01T20:55:02.000Z"
        "NUM_PARTITIONS": "10"
    }
```