

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

**前提条件**

読み取り元の Kustomer オブジェクト。Brands または Cards などのオブジェクト名が必要です。次の表に、サポートされているエンティティを示します。

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


| エンティティ | フィルタリング可能 | 制限をサポートする | Order By をサポートする | Select \$1 をサポートする | パーティション分割をサポートする | 
| --- | --- | --- | --- | --- | --- | 
| Brands | なし | あり | なし | あり | なし | 
| [Cards] (カード) | なし | あり | なし | あり | なし | 
| Chat Settings | なし | なし | なし | あり | なし | 
| Companies | はい | あり | あり | あり | あり | 
| Conversations | はい | あり | あり | あり | あり | 
| Customers | はい | あり | あり | あり | あり | 
| Customer Searches Pinned | なし | あり | なし | あり | なし | 
| Customer Searches Position | なし | なし | なし | あり | なし | 
| Email Hooks | なし | あり | なし | あり | なし | 
| Web Hooks | なし | あり | なし | あり | なし | 
| KB Articles | なし | あり | なし | あり | なし | 
| KB Categories | なし | あり | なし | あり | なし | 
| KB Forms | なし | あり | なし | あり | なし | 
| KB Routes | なし | あり | なし | あり | なし | 
| KB Tags | なし | あり | なし | あり | なし | 
| KB Templates | なし | あり | なし | あり | なし | 
| KB Themes | なし | あり | なし | あり | なし | 
| Klasses | なし | あり | なし | あり | なし | 
| KViews | なし | あり | なし | あり | なし | 
|  メッセージ | はい | あり | あり | あり | はい | 
| コメント | はい | あり | あり | あり | あり | 
| 通知 | なし | あり | なし | あり | なし | 

**例**:

```
Kustomer_read = glueContext.create_dynamic_frame.from_options(
    connection_type="kustomer",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "brands",
        "API_VERSION": "v1"
    }
```

## Kustomer のエンティティとフィールドの詳細
<a name="kustomer-reading-from-entities-field-details"></a>

エンティティとフィールドの詳細については、以下を参照してください:
+ [Brands](https://api.kustomerapp.com/v1/brands)
+ [[Cards]](https://api.kustomerapp.com/v1/cards) (カード)
+ [Chat Settings](https://api.kustomerapp.com/v1/chat/settings)
+ [Companies](https://api.kustomerapp.com/v1/companies)
+ [Conversations](https://api.kustomerapp.com/v1/conversations)
+ [Customers](https://api.kustomerapp.com/v1/customers)
+ [Customers Searches Pinned](https://api.kustomerapp.com/v1/customers/searches/pinned)
+ [Customer Searches Positions](https://api.kustomerapp.com/v1/customers/searches/positions)
+ [Hooks Email](https://api.kustomerapp.com/v1/hooks/email)
+ [Hooks Web](https://api.kustomerapp.com/v1/hooks/web)
+ [KB Articles](https://api.kustomerapp.com/v1/kb/articles)
+ [KB Categories](https://api.kustomerapp.com/v1/kb/categories)
+ [KB Forms]( https://api.kustomerapp.com/v1/kb/forms)
+ [KB Routes](https://api.kustomerapp.com/v1/kb/routes)
+ [KB Tags](https://api.kustomerapp.com/v1/kb/tags)
+ [KB Templates](https://api.kustomerapp.com/v1/kb/templates)
+ [KB Themes](https://api.kustomerapp.com/v1/kb/themes)
+ [Klasses](https://api.kustomerapp.com/v1/klasses)
+ [Kviews](https://api.kustomerapp.com/v1/kviews)
+ [メッセージ](https://api.kustomerapp.com/v1/messages)
+ [Notes](https://api.kustomerapp.com/v1/notes) (メモ)
+ [通知](https://api.kustomerapp.com/v1/notifications)

Kustomer API v1

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

## パーティショニングクエリ
<a name="kustomer-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"
  ```
+ `UPPER_BOUND`: 選択したパーティションフィールドの**排他的**上限値。
+ `NUM_PARTITIONS`: パーティション数。

エンティティごとのパーティション分割フィールドのサポートの詳細は、次の表にまとめられています。

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

例:

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