Salesforce Marketing Cloud エンティティからの読み取り
前提条件
読み取り元の Salesforce Marketing Cloud オブジェクト。Activity または Campaigns などのオブジェクト名が必要です。次の表に、サポートされているエンティティを示します。
ソースに対応するエンティティ:
| エンティティ | インターフェイス | フィルタリング可能 | 制限をサポートする | Order By をサポートする | SELECT * をサポートする | パーティション分割をサポートする |
|---|---|---|---|---|---|---|
| Event Notification Callback | REST | なし | なし | なし | あり | なし |
| Seed-List | REST | なし | あり | なし | あり | なし |
| セットアップ | REST | はい | あり | なし | あり | なし |
| ドメインの検証 | REST | はい | あり | あり | あり | なし |
| Objects Nested Tags | REST | あり | なし | なし | あり | なし |
| 問い合わせ | REST | なし | あり | なし | あり | なし |
| Event Notification Subscription | REST | なし | なし | なし | あり | なし |
| メッセージング | REST | なし | あり | なし | あり | なし |
| アクティビティ | SOAP | なし | なし | なし | あり | あり |
| Bounce Event | SOAP | なし | なし | なし | あり | あり |
| Click Event | SOAP | なし | なし | なし | あり | あり |
| Content Area | SOAP | なし | なし | なし | あり | あり |
| Data Extension | SOAP | なし | あり | なし | あり | あり |
| E メール | SOAP | なし | あり | なし | あり | あり |
| Forwarded Email Event | SOAP | なし | あり | なし | あり | あり |
| Forward Email OptInEvent | SOAP | なし | あり | なし | あり | あり |
| リンク | SOAP | なし | あり | なし | あり | あり |
| Link Send | SOAP | なし | あり | なし | あり | あり |
| リスト | SOAP | なし | あり | なし | あり | あり |
| List Subscriber | SOAP | なし | あり | なし | あり | あり |
| Not Sent Event | SOAP | なし | あり | なし | あり | あり |
| Open Event | SOAP | なし | あり | なし | あり | あり |
| 送信 | SOAP | なし | あり | なし | あり | あり |
| Sent Event | SOAP | なし | あり | なし | あり | あり |
| サブスクライバー | SOAP | なし | あり | なし | あり | あり |
| Survey Event | SOAP | なし | あり | なし | あり | あり |
| Unsub Event | SOAP | なし | あり | なし | あり | あり |
| Audit Events | REST | なし | あり | あり | あり | なし |
| キャンペーン | REST | なし | あり | あり | あり | なし |
| インタラクション | REST | なし | あり | あり | あり | なし |
| Content Assets | REST | なし | あり | あり | あり | なし |
REST の例:
salesforcemarketingcloud_read = glueContext.create_dynamic_frame.from_options( connection_type="salesforcemarketingcloud", connection_options={ "connectionName": "connectionName", "ENTITY_NAME": "Campaigns", "API_VERSION": "v1", "INSTANCE_URL": "https://**********************.rest.marketingcloudapis.com" } )
SOAP の例:
salesforcemarketingcloud_read = glueContext.create_dynamic_frame.from_options( connection_type="salesforcemarketingcloud", connection_options={ "connectionName": "connectionName", "ENTITY_NAME": "Activity", "API_VERSION": "v1", "INSTANCE_URL": "https://**********************.soap.marketingcloudapis.com" } )
Salesforce Marketing Cloud エンティティとフィールドの詳細:
次の表に、Salesforce Marketing Cloud エンティティを示します。静的メタデータを持つ REST エンティティと動的メタデータを持つ SOAP エンティティがあります。
静的メタデータを持つ REST エンティティ:
| エンティティ | フィールド | データ型 | サポートされている演算子 |
|---|---|---|---|
| Event Notification Callback | callbackId | 文字列 | |
| callbackName | 文字列 | ||
| url | 文字列 | ||
| maxBatchSize | 整数 | ||
| ステータス | 文字列 | ||
| statusReason | 文字列 | ||
| Seed-List | id | 文字列 | |
| 名前 | 文字列 | ||
| description | 文字列 | ||
| activeSeedCount | 整数 | ||
| セットアップ | customerKey | 文字列 | |
| 名前 | 文字列 | ||
| description | 文字列 | ||
| locationType | 文字列 | '=' | |
| awsFileTransferLocation | Struct | ||
| Domain verification | enterpriseId | 整数 | |
| ステータス | 文字列 | '=' | |
| domainType | 文字列 | '=' | |
| memberId | 整数 | ||
| emailSendTime | DateTime | ||
| ドメイン | 文字列 | ||
| isSendable | ブール値 | ||
| Objects Nested Tags | id | 整数 | |
| modifiedDate | DateTime | ||
| tags | リスト | ||
| 名前 | 文字列 | ||
| description | 文字列 | ||
| parentId | 整数 | ||
| 連絡先 | 値 | リスト | |
| Event Notification Subscription | subscriptionName | 文字列 | |
| callbackId | 文字列 | ||
| callbackName | 文字列 | ||
| eventCategoryTypes | リスト | ||
| フィルター | リスト | ||
| url | 文字列 | ||
| maxBatchSize | 整数 | ||
| subscriptionId | 文字列 | ||
| ステータス | 文字列 | ||
| statusReason | 文字列 | ||
| メッセージング | deliveryTime | DateTime | |
| id | 文字列 | ||
| messageId | 文字列 | ||
| ステータス | 文字列 | ||
| 次のように変更します。 | Struct | ||
| インタラクション | ステータス | 文字列 | '=' |
| id | 文字列 | ||
| キー | 文字列 | ||
| 名前 | 文字列 | ||
| lastPublishedDate | DateTime | ||
| description | 文字列 | ||
| version | 整数 | ||
| workflowApiVersion | 整数 | ||
| createdDate | DateTime | ||
| modifiedDate | DateTime | ||
| goals | Struct | ||
| stats | Struct | ||
| entryMode | 文字列 | ||
| defaults | Struct | ||
| executionMode | Struct | ||
| definitionId | 文字列 | ||
| Content Assets | id | 整数 | |
| customerKey | 文字列 | ||
| objectId | 文字列 | ||
| contentType | 文字列 | ||
| assetType | Struct | ||
| 名前 | 文字列 | ||
| description | 文字列 | ||
| owner (オーナー) | Struct | ||
| createdDate | DateTime | ||
| CreatedBy | Struct | ||
| modifiedDate | DateTime | ||
| modifiedBy | Struct | ||
| thumbnail | Struct | ||
| category | Struct | ||
| meta | Struct | ||
| ビュー | Struct | ||
| availableViews | Struct | ||
| データ | Struct | ||
| legacyData | Struct | ||
| modelVersion | 整数 | ||
| バージョン | 整数 | ||
| ロック | ブール値 | ||
| FileProperties | Struct | ||
| [タグ] | リスト | ||
| コンテンツ | 文字列 | ||
| 設計 | 文字列 | ||
| SuperContent | 文字列 | ||
| CustomFields | Struct | ||
| ブロック | Struct | ||
| MinBlocks | 整数 | ||
| MaxBlocks | 整数 | ||
| チャンネル | Struct | ||
| AllowedBlocks | リスト | ||
| スロット | Struct | ||
| BusinessUnitAvailability | Struct | ||
| sharingProperties | Struct | ||
| sharingProperties.sharedWith | Struct | ||
| sharingProperties.sharingType | 文字列 | ||
| テンプレート | Struct | ||
| ファイル | 文字列 | ||
| GenerateFrom | 文字列 | ||
| Audit Events | id | 整数 | |
| createdDate | DateTime | ||
| memberId | 整数 | ||
| enterpriseId | 整数 | ||
| employee | Struct | ||
| objectType | Struct | ||
| オペレーション | Struct | ||
| オブジェクト | Struct | ||
| transactionId | 文字列 | ||
| キャンペーン | id | 整数 | |
| createdDate | DateTime | ||
| modifiedDate | DateTime | ||
| 名前 | 文字列 | ||
| description | 文字列 | ||
| campaignCode | [String] (文字列) | ||
| color | 文字列 | ||
| favorite | ブール値 |
動的メタデータを持つ SOAP エンティティ:
| エンティティ | データ型 | サポートされている演算子 |
|---|---|---|
| アクティビティ | 文字列 | LIKE,!=,= |
| Struct | ||
| 整数 | !=,=,>=,<=,<,> | |
| 倍精度 | !=,=,>=,<=,<,> | |
| ブール値 | !=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Bounce Event | 整数 | !=,=,>=,<=,<,> |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| 文字列 | LIKE,!=,= | |
| Struct | ||
| Click Event | 整数 | !=,=,>=,<=,<,> |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| 文字列 | LIKE,!=,= | |
| Struct | ||
| Content Area | Struct | |
| 文字列 | LIKE,!=,= | |
| 整数 | !=,=,>=,<=,<,> | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| ブール値 | !=,= | |
| Data Extension | DateTime | >=,<=,<,>,=,BETWEEN |
| 文字列 | LIKE,!=,= | |
| E メール | 整数 | !=,=,>=,<=,<,> |
| 文字列 | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| ブール値 | !=,= | |
| Struct | ||
| Forwarded Email Event | 整数 | !=,=,>=,<=,<,> |
| 文字列 | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| Forwarded Email OptInEvent | 整数 | !=,=,>=,<=,<,> |
| 文字列 | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| リンク | 整数 | !=,=,>=,<=,<,> |
| Link Send | 整数 | !=,=,>=,<=,<,> |
| 文字列 | LIKE,!=,= | |
| 倍精度 | !=,=,>=,<=,<,> | |
| リスト | 整数 | !=,=,>=,<=,<,> |
| 文字列 | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| List Subscriber | 整数 | !=,=,>=,<=,<,> |
| 文字列 | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| Not Sent Event | 整数 | !=,=,>=,<=,<,> |
| 文字列 | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| Open Event | 整数 | !=,=,>=,<=,<,> |
| 文字列 | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| 送信 | 整数 | !=,=,>=,<=,<,> |
| 文字列 | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| ブール値 | !=,= | |
| Struct | ||
| Sent Event | 整数 | !=,=,>=,<=,<,> |
| 文字列 | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| サブスクライバー | 整数 | !=,=,>=,<=,<,> |
| 文字列 | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| Survey Event | 整数 | !=,=,>=,<=,<,> |
| 文字列 | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| Unsub Event | 整数 | !=,=,>=,<=,<,> |
| 文字列 | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| ブール値 | !=,= | |
| Struct |
パーティショニングクエリ
Salesforce Marketing Cloud では、整数および DateTime データ型フィールドは、フィールドベースのパーティション分割をサポートします。
Spark で同時実行を使用する場合は、追加の Spark オプション PARTITION_FIELD、LOWER_BOUND、UPPER_BOUND、および NUM_PARTITIONS を指定できます。これらのパラメータを使用すると、元のクエリは Spark タスクで同時に実行できるサブクエリの NUM_PARTITIONS の数に分割されます。
PARTITION_FIELD: クエリのパーティション化に使用するフィールドの名前。LOWER_BOUND: 選択したパーティションフィールドの包括的な下限値。タイムスタンプフィールドでは、Spark SQL クエリで使用される Spark タイムスタンプ形式を受け入れます。
有効な値の例は次のとおりです:
“2024-05-07T02:03:00.00Z"UPPER_BOUND: 選択したパーティションフィールドの排他的上限値。NUM_PARTITIONS: パーティション数。
例:
salesforcemarketingcloud_read = glueContext.create_dynamic_frame.from_options( connection_type="salesforcemarketingcloud", connection_options={ "connectionName": "connectionName", "ENTITY_NAME": "ListSubscriber", "API_VERSION": "v1", "PARTITION_FIELD": "CreatedDate", "LOWER_BOUND": "2023-09-07T02:03:00.000Z", "UPPER_BOUND": "2024-05-07T02:03:00.000Z", "NUM_PARTITIONS": "10" } )