このページ: DDL ファイルをアップロードし、テーブル間の関係を定義し、オーケストレーションキャンペーンで使用するスキーマを既存のエンティティにリンクして、Adobe Experience Platform でリレーショナルスキーマを作成する方法について説明します。
ロイヤルティメンバーシップ、ロイヤルティトランザクション、ロイヤルティ報酬などのスキーマを作成して、オーケストレーションキャンペーンに必要なリレーショナルデータモデルを定義します。 各スキーマには、プライマリキー、バージョン管理属性、受信者や ブランド などのエンティティを参照する適切な関係を含める必要があります。
スキーマは、インターフェイスを通じて手動で作成することや、DDL ファイルを使用して一括で読み込むことができます。
この節では、DDL(データ定義言語)ファイルをアップロードして Adobe Experience Platform 内でリレーショナルスキーマを作成する方法について、手順を追って説明します。 DDL ファイルを使用すると、テーブル、属性、キー、関係など、データモデルの構造を事前に定義できます。
-
DDL ファイルをアップロードしてリレーショナルスキーマを作成し、その構造を定義します。
-
データモデルのテーブル間の関係を定義します。
-
スキーマをリンクして、リレーショナルデータを受信者やブランドなどの既存のプロファイルエンティティに接続します。
-
サポートされているソースからデータセットにデータを取得します。
➡️ リレーショナルスキーマについて詳しくは、Adobe Experience Platform ドキュメントを参照してください。
DDL ファイルのアップロード ddl-upload
DDL ファイルをアップロードすると、テーブル、属性、キー、関係など、データモデルの構造を事前に定義できます。
Excel ベースのスキーマファイルのアップロードがサポートされています。 提供されているテンプレートをダウンロードして、スキーマ定義を簡単に準備します。
-
ENUM
ENUM フィールドは、DDL ベースと手動スキーマ作成の両方でサポートされています。 DDL ファイルからスキーマを読み込むと、ファイルで定義された定義済みリストが自動的に読み込まれるので、許可される値の固定セットを使用して属性を定義できます。次に例を示します。
code language-none CREATE TABLE orders ( order_id INT NOT NULL, product_id INT NOT NULL, order_date DATE NOT NULL, customer_id INT NOT NULL, quantity INT NOT NULL, order_status enum ('PENDING', 'SHIPPED', 'DELIVERED', 'CANCELLED'), PRIMARY KEY (order_id, product_id) ); -
複合キーと複合関係
複数のフィールドにまたがる複合プライマリキーは、リレーショナルスキーマ定義でサポートされるので、複数のフィールドと共に使用してレコードを一意に識別できます。
DDL または Excel ファイルからスキーマを読み込むと、テーブル間の複合関係が自動的に作成されます。 エンティティ関係ビューでは、各複合リンクに、リンクされたテーブル間のフィールドペアリングの完全なセットが表示されます。
-
データガバナンスのスキーマラベル
アクセス制御や使用制限などのデータガバナンスポリシーの適用に、スキーマフィールドレベルでラベル付けがサポートされています。 詳しくは、Adobe Experience Platform ドキュメントを参照してください。
-
Adobe Experience Platform にログインします。
-
データ管理/スキーマメニューに移動します。
-
「スキーマを作成」をクリックします。
-
スキーマタイプとして「リレーショナル」を選択します。
-
「DDL ファイルをアップロード」を選択し、エンティティ関係ダイアグラムを定義して、スキーマを作成します。
テーブル構造には、次の項目を含める必要があります。
- 1 つ以上のプライマリキー
- バージョン識別子(
datetimeタイプまたはnumberタイプの「lastmodified」フィールドなど)。 - 変更データキャプチャ(CDC)取り込みの場合、タイプ
Stringの_change_request_typeという特別な列。これは、データ変更のタイプ(挿入、更新、削除など)を示し、増分処理を可能にします。 - DDL ファイルで定義できるテーブルは 200 までです。
- テーブル自体を参照できません。自己参照関係はDDL ファイルで許可されていません。
note important IMPORTANT ターゲティングに使用するスキーマには、関連付けられた ID 名前空間を持つタイプ Stringの ID フィールドを 1 つ以上含める必要があります。
これにより、Adobe Journey Optimizer のターゲティングおよび ID 解決機能との互換性が確保されます。 -
DDL ファイルをドラッグ&ドロップし、「次へ」をクリックします。
DDL ファイルでサポートされる最大サイズは 10 MB です。 ファイル名には、文字、数字、アンダースコア(_)、ハイフン( – )、またはスペースのみを含め、1つの拡張子を含める必要があります。
-
スキーマ名を入力します。
-
各スキーマとその列を設定し、プライマリキーとバージョン記述子が指定されていることを確認します。
データセットが最新のデータで更新されるようにするには、
lastmodifiedなどの 1 つの属性をバージョン記述子(タイプdatetime、longまたはint)として指定する必要があります。 ユーザーはバージョン記述子を変更できます。これは、一度設定すると必須になります。 属性をプライマリキー(PK)とバージョン記述子の両方に指定できません。
-
属性を
identityとしてマークし、定義済みの ID 名前空間にマッピングします。 -
各テーブルに対して名前変更、削除または説明の追加を行います。
-
完了したら、「完了」をクリックします。
これで、キャンバス内でテーブルとフィールドの定義を確認できるようになりました。 詳しくは、以下の節を参照してください。
関係の定義 relationships
関係は、スキーマの作成時に DDL ファイル内で直接指定できます。 ファイル以外で関係を定義する場合は、次の手順に従って、インターフェイスで定義できます。
-
データモデルのキャンバス表示にアクセスし、リンクする 2 つのテーブルを選択します
-
ソース結合の横にある「
」ボタンをクリックし、矢印をドラッグしてターゲット結合の方向に誘導し、接続を確立します。note NOTE 複数のフィールドにまたがる複合キーは、DDL ファイルで定義されている場合にサポートされます。 DDL または Excel ファイルから読み込むと、テーブル間の複合関係が自動的に作成されます。 エンティティ関係ビューでは、複合リンクに、リンクされたテーブル間のフィールドペアリングの完全なセットが表示されます。
-
指定されたフォームに入力してリンクを定義し、設定が完了したら「適用」をクリックします。
基数:
-
一対多:ソーステーブルの 1 つのオカレンスは、ターゲットテーブルの複数のオカレンスに対応させることができますが、ターゲットテーブルの 1 つのオカレンスには、ソーステーブルの対応オカレンスは最大でも 1 つしか存在しません。
-
N-1:ターゲットテーブルの 1 つのオカレンスは、ソーステーブルの複数のオカレンスに対応させることができますが、ソーステーブルの 1 つのオカレンスには、ターゲットテーブルの対応オカレンスは最大でも 1 つしか存在しません。
-
一対一:ソーステーブルの 1 つのオカレンスは、最大でターゲットテーブルの 1 つのオカレンスに対応させることができます。
-
-
データモデルで定義されたすべてのリンクは、キャンバス表示では矢印として表されます。 必要に応じて、詳細を表示したり、編集したり、リンクを削除したりするには、2 つのテーブル間の矢印をクリックします。
-
ツールバーを使用して、キャンバスをカスタマイズおよび調整します。
-
ズームイン:データモデルの詳細をより明確に表示するために、キャンバスを拡大します。
-
ズームアウト:データモデルをより広く表示するには、キャンバスサイズを縮小します。
-
表示に合わせる:すべてのスキーマを表示領域内に合わせるには、ズームを調整します。
-
フィルター:キャンバス内に表示するスキーマを選択します。
-
自動レイアウトを適用:スキーマを自動的に整理して、より適切に整理します。
-
マップを表示:ミニマップオーバーレイを切り替えると、大規模スキーマレイアウトや複雑なスキーマレイアウトをより簡単に移動できます。
-
すべて展開/すべて折りたたむ:すべてのスキーマノードをすばやく展開または折りたたんで、属性を表示または非表示にします。
-
ダウンロード:ER 図を.png ファイルとしてダウンロードします。
-
-
完了したら、「保存」をクリックします。 このアクションにより、スキーマと関連するデータセットが作成され、データセットをオーケストレーションキャンペーンで使用できます。
-
「ジョブを開く」をクリックして、作成ジョブの進行状況を監視します。 このプロセスは、DDL ファイルで定義されているテーブルの数に応じて、数分かかる場合があります。
また、DDL ファイルをアップロードウィンドウを開き、「すべての DDL 読み込みジョブを表示」を選択して、DDL 読み込みジョブにアクセスすることもできます。
スキーマをリンク link-schema
ロイヤルティトランザクションスキーマと 受信者 スキーマ間の関係を確立して、各トランザクションを正しい顧客レコードに関連付けます。
-
スキーマに移動し、以前に作成した ロイヤルティトランザクション を開きます。
-
顧客の フィールドプロパティ から「関係を追加」をクリックします。
-
「多対一」を関係 タイプ として選択します。
-
既存の 受信者 スキーマにリンクします。
-
現在のスキーマからの関係名と 参照スキーマからの関係名 を入力します。
-
「適用」をクリックして変更を保存します。
続けて、ロイヤルティ報酬スキーマと ブランドスキーマ の関係を作成し、各報酬エントリを適切なブランドに関連付けます。
スキーマまたはデータセットがエラーコードを返す場合は、関係スキーマとデータセットのエラーを参照してください。
This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.
For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.
- TL;DR: This page explains how to create relational schemas in Adobe Experience Platform by uploading a DDL file, defining relationships between tables, and linking schemas to existing entities for use in Orchestrated campaigns.
Intents:
- Upload a DDL file to create relational schemas and define their structure.
- Define relationships between tables in the data model, either within the DDL file or in the interface.
- Link a relational schema to existing profile entities such as Recipients or Brands.
- Identify the required table structure elements: primary key, version identifier, and identity field for targeting.
- Monitor the progress of a DDL import job.
- Resolve schema or dataset errors returned during this process.
Glossary:
- Relational schema: a schema created to define the data model required for Orchestrated campaigns, such as Loyalty Memberships, Loyalty Transactions, or Loyalty Rewards (product-specific)
- DDL file: a Data Definition Language file used to define tables, attributes, keys, and relationships of a data model in advance (product-specific)
- ENUM: a field type supporting a fixed set of allowed values, supported in both DDL-based and manual schema creation (product-specific)
- Composite key / Composite relationships: primary keys or relationships spanning multiple fields, supported in relational schema definitions and created automatically when loading from a DDL or Excel file (product-specific)
- Schema label: a labeling mechanism at the schema field level used to enforce data governance policies such as access control and usage restrictions (product-specific)
- Version descriptor: an attribute (for example
lastmodified) designated to ensure datasets are updated with the latest data; typedatetime,long, orint(product-specific) - Identity field: a field of type
Stringwith an associated identity namespace, required on any schema used for targeting (product-specific) - Cardinality: the type of relationship between two tables — 1-N, N-1, or 1-1 (product-specific)
Guardrails:
- A DDL file must not define more than 200 tables (hard limit).
- A table cannot reference itself: self-referential relationships are not allowed in the DDL file (hard limit).
- The maximum supported size for a DDL file is 10MB (hard limit).
- The DDL file name must contain only letters, numbers, underscores (_), hyphens (-), or spaces, and include a single extension (hard limit).
- The table structure must contain at least one primary key and a version identifier, such as a
lastmodifiedfield of typedatetimeornumber. - For Change Data Capture (CDC) ingestion, the table structure must contain a special column named
_change_request_typeof typeString. - Any schema used for targeting must include at least one identity field of type
Stringwith an associated identity namespace, to ensure compatibility with Adobe Journey Optimizer’s targeting and identity resolution capabilities. - An attribute cannot be both a primary key (PK) and a version descriptor.
- The version descriptor becomes mandatory once set, though users can change it.
- Only relationships explicitly defined within the DDL file are recognized by the system; any entity relationships that exist outside of the DDL file are ignored and not processed.
- The View relationships diagram from the Relationship tab is read-only; to create or edit a relationship, the schema must be opened from the Browse tab instead.
- Saving the data model creates the schemas and associated data sets and enables the data set for use in Orchestrated campaigns.
Terminology:
- Canonical name: relational schema — variants: schema
- Do not confuse: “1-N” cardinality (one source occurrence can have several target occurrences, but one target occurrence has at most one corresponding source occurrence) ≠ “N-1” cardinality (one target occurrence can have several source occurrences, but one source occurrence has at most one corresponding target occurrence) ≠ “1-1” cardinality (one source occurrence can have at most one corresponding target occurrence)
- Do not confuse: “primary key” (uniquely identifies records) ≠ “version descriptor” (ensures datasets are updated with the latest data) — an attribute cannot be both
FAQ:
- Q: What must a table structure contain to create a relational schema from a DDL file? — At least one primary key, a version identifier such as a
lastmodifiedfield of typedatetimeornumber, and for CDC ingestion a_change_request_typecolumn of typeString. - Q: Is there a limit on the number of tables in a DDL file? — Yes, a DDL file must not define more than 200 tables.
- Q: Can a table reference itself in the DDL file? — No, self-referential relationships are not allowed in the DDL file.
- Q: What is the maximum DDL file size? — 10MB.
- Q: What is required for a schema used for targeting? — At least one identity field of type
Stringwith an associated identity namespace. - Q: Are relationships defined outside the DDL file recognized? — No, only relationships explicitly defined within the DDL file are recognized; entity relationships that exist outside of the DDL file are ignored and not processed.
- Q: Where can a relationship be created or edited? — From the Browse tab; the View relationships diagram from the Relationship tab is read-only.
Related pages:
- For ingesting data into a dataset after creating relational schemas: Ingest data (orchestrated/ingest-data.md)
- For resolving a schema or dataset error code: Relational schema and dataset errors (orchestrated/relational-schema-errors.md)
Personas:
- developer: Can create relational schemas by uploading a DDL file that defines tables, attributes, keys, and relationships. Can use ENUM fields with a fixed set of allowed values, and composite primary keys and composite relationships spanning multiple fields. The page states that any schema used for targeting must include at least one identity field of type String with an associated identity namespace. Where: “Upload a DDL file”.
- admin: Can select Relational as the Schema type and select Upload DDL file to define an entity relationship diagram. Can navigate the Data Management > Schema menu to create a schema, then select Open Jobs to monitor the DDL import job. The page states that a DDL file must not define more than 200 tables and must not exceed 10MB in size. Where: “Guardrails”.
Onboarding:
- Level: Experienced
- First minimal step: Select Relational as your Schema type.
- Success check: You can now verify the table and field definitions within the canvas.
- Next: After creating relational schemas, ingest data into your dataset: Configuration steps (orchestrated/ingest-data.md); If a schema or dataset returns an error code: Relational schema and dataset errors (orchestrated/relational-schema-errors.md)