

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

 **前提条件** 
+  読み取り元の Pipedrive オブジェクト。使用可能なエンティティを確認するには、以下のサポートされているエンティティの表を参照してください。

 **サポートされているエンティティ** 


| エンティティ | フィルタリング可能 | 制限をサポートする | Order By をサポートする | Select \$1 をサポートする | パーティショニングをサポートする | 
| --- | --- | --- | --- | --- | --- | 
| アクティビティ | はい | あり | なし | あり | あり | 
| アクティビティタイプ | なし | なし | なし | あり | なし | 
| 通話ログ | なし | なし | なし | あり | なし | 
| 通貨 | はい | あり | なし | あり | なし | 
| Deals | はい | あり | あり | あり | あり | 
| リード | はい | あり | あり | あり | なし | 
| リードソース | なし | あり | なし | あり | なし | 
| リードラベル | なし | なし | なし | なし | なし | 
| コメント | はい | あり | あり | あり | あり | 
| 組織 | はい | あり | なし | あり | あり | 
| 許可セット | あり | なし | なし | あり | なし | 
| 人物 | はい | あり | あり | あり | あり | 
| Pipelines | なし | あり | なし | あり | なし | 
| 製品 | はい | あり | なし | あり | あり | 
| ロール | なし | あり | なし | あり | なし | 
| ステージ | はい | あり | なし | あり | なし | 
| [ユーザー] | なし | なし | なし | あり | なし | 

 **例** 

```
pipedrive_read= glueContext.create_dynamic_frame.from_options(
    connection_type="PIPEDRIVE",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "activites",
        "API_VERSION": "v1"
    }
```

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

 エンティティリスト: 
+  アクティビティ:[ https://developers.pipedrive.com/docs/api/v1/Activities ](https://developers.pipedrive.com/docs/api/v1/Activities) 
+  アクティビティタイプ:[ https://developers.pipedrive.com/docs/api/v1/ActivityTypes ](https://developers.pipedrive.com/docs/api/v1/ActivityTypes) 
+  通話ログ:[ https://developers.pipedrive.com/docs/api/v1/CallLogs ](https://developers.pipedrive.com/docs/api/v1/CallLogs) 
+  通貨:[ https://developers.pipedrive.com/docs/api/v1/Currencies ](https://developers.pipedrive.com/docs/api/v1/Currencies) 
+  ディール:[ https://developers.pipedrive.com/docs/api/v1/Deals ](https://developers.pipedrive.com/docs/api/v1/Deals) 
+  リード:[ https://developers.pipedrive.com/docs/api/v1/Leads ](https://developers.pipedrive.com/docs/api/v1/Leads) 
+  リードソース:[ https://developers.pipedrive.com/docs/api/v1/LeadSources ](https://developers.pipedrive.com/docs/api/v1/LeadSources) 
+  リードラベル:[ https://developers.pipedrive.com/docs/api/v1/LeadLabels ](https://developers.pipedrive.com/docs/api/v1/LeadLabels) 
+  メモ:[ https://developers.pipedrive.com/docs/api/v1/Notes ](https://developers.pipedrive.com/docs/api/v1/Notes) 
+  組織:[ https://developers.pipedrive.com/docs/api/v1/Organizations ](https://developers.pipedrive.com/docs/api/v1/Organizations) 
+  許可セット:[ https://developers.pipedrive.com/docs/api/v1/PermissionSets ](https://developers.pipedrive.com/docs/api/v1/PermissionSets) 
+  個人:[ https://developers.pipedrive.com/docs/api/v1/Persons ](https://developers.pipedrive.com/docs/api/v1/Persons) 
+  パイプライン:[ https://developers.pipedrive.com/docs/api/v1/Pipelines ](https://developers.pipedrive.com/docs/api/v1/Pipelines) 
+  製品:[ https://developers.pipedrive.com/docs/api/v1/Products ](https://developers.pipedrive.com/docs/api/v1/Products) 
+  ロール:[ https://developers.pipedrive.com/docs/api/v1/Roles ](https://developers.pipedrive.com/docs/api/v1/Roles) 
+  ステージ:[ https://developers.pipedrive.com/docs/api/v1/Stages ](https://developers.pipedrive.com/docs/api/v1/Stages) 
+  ユーザー:[ https://developers.pipedrive.com/docs/api/v1/Users ](https://developers.pipedrive.com/docs/api/v1/Users) 


| エンティティ | データタイプ | サポートされている演算子 | 
| --- | --- | --- | 
| アクティビティ、ディール、メモ、組織、個人、製品。 | 日付 | '=' | 
|  | 整数 | '=' | 
|  | 文字列 | '=' | 
|  | ブール値 | '=' | 

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

 Pipedrive では、アクティビティエンティティの 1 つのフィールド (due\$1date) のみでフィールドベースのパーティショニングがサポートされています。それは日付フィールドです。

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

   日付については、Spark SQL クエリで使用される Spark の日付形式を受け入れます。有効な値の例: `"2024-02-06"`。
+  `UPPER_BOUND`: 選択したパーティションフィールドの排他的上限値。
+  `NUM_PARTITIONS`: パーティション数。

 **例** 

```
pipedrive_read = glueContext.create_dynamic_frame.from_options(
    connection_type="PIPEDRIVE",
    connection_options={
        "connectionName": "connectionName",
        "ENTITY_NAME": "activites",
        "API_VERSION": "v1",
        "PARTITION_FIELD": "due_date"
        "LOWER_BOUND": "2023-09-07T02:03:00.000Z"
        "UPPER_BOUND": "2024-05-07T02:03:00.000Z"
        "NUM_PARTITIONS": "10"
    }
```