在此頁面上:瞭解如何透過上傳DDL檔案、定義表格之間的關係,以及將結構描述連結到現有實體以用於「協調的行銷活動」,在Adobe Experience Platform中建立關聯式結構描述。
透過建立結構描述(例如忠誠會員資格、忠誠度交易和忠誠度獎勵),定義協調行銷活動所需的關聯式資料模型。 每個結構描述都必須包含主索引鍵、版本設定屬性以及適當的關聯性,以參照實體,例如 收件者 或品牌。
您可以透過介面手動建立結構描述,或使用DDL檔案大量匯入結構描述。
本章節提供如何透過上傳 DDL (資料定義語言) 檔案,可在 Adobe Experience Platform 中建立關聯式結構描述的逐步指南。 使用 DDL 檔案,讓您可以預先定義資料模型的結構,包括表格、屬性、索引鍵和關係。
➡️ 在Adobe Experience Platform檔案中進一步瞭解關聯式結構描述
上傳DDL檔案 ddl-upload
透過上傳DDL檔案,您可以預先定義資料模型的結構,包括表格、屬性、索引鍵和關係。
支援以Excel為基礎的結構描述檔案上傳。 下載提供的範本以輕鬆準備您的結構描述定義。
-
列舉
DDL架構和手動建立架構均支援ENUM欄位。 從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 檔案,以便定義實體關係圖,同時建立結構描述。
表格結構必須包含以下元素:
- 至少一個主索引鍵。
- 版本識別碼,例如
lastmodified欄位類型datetime或number。 - 針對變更資料擷取(CDC)擷取,為名為
_change_request_type且型別為String的特殊欄,其指示資料變更的型別(例如,插入、更新、刪除)並啟用增量處理。 - DDL檔案所定義的資料表不能超過200個。
- 資料表不能參考自身:DDL檔案中不允許自我參考關係。
note important IMPORTANT 任何用於定位的結構描述都必須包含至少一個型別 String的身分欄位,並具有相關聯的身分名稱空間。
這可確保與Adobe Journey Optimizer的定位和身分解析功能相容。 -
拖放 DDL 檔案,然後按一下下一步。
請注意,支援的DDL檔案大小上限為10MB。 檔案名稱只能包含字母、數字、底線(_)、連字型大小(-)或空格,並包含單一副檔名。
-
輸入結構描述名稱。
-
設定每個結構描述及其欄,確保已指定主索引鍵和版本描述項。
必須將一個屬性(例如
lastmodified)指定為版本描述項(型別datetime、long或int),以確保資料集以最新資料更新。 使用者可以變更版本描述項,一旦設定,該描述項就成為必要。 屬性不能同時是主索引鍵(PK)和版本描述項。
-
將屬性標示為
identity並將它對應到定義的身分名稱空間。 -
重新命名、刪除或新增說明至每個表格。
-
完成後,請按一下完成。
目前可以在畫布內,驗證表格和欄位定義。 請參閱下列章節深入了解
定義關係 relationships
建立架構時,您可以直接在DDL檔案中指定關係。 如果您偏好在檔案外部定義關係,可以在介面中依照下列步驟來定義。
-
存取資料模型的畫布視圖,然後選擇您想連結的兩個表格
-
按一下來源聯結旁的
按鈕,然後拖放並導引箭頭朝向目標聯結,以便建立連線。note NOTE 在DDL檔案中定義時,支援跨多個欄位的複合索引鍵。 從DDL或Excel檔案載入時,會自動建立表格之間的複合關係。 在實體關係檢視中,複合連結會顯示連結表格之間的完整欄位配對集。
-
請填寫指定表單,以便定義連結,並在完成設定後,按一下套用。
基數:
-
1-N:來源表格的單一發生次數可以擁有眾多目標表格對應的發生次數,但目標表格的單一發生次數,最多只可以擁有來源表格的單一對應發生次數。
-
N-1:目標表格的單一發生次數可以擁有眾多來源表格對應的發生次數,但來源表格單一發生次數,最多只可以擁有目標表格的單一對應發生次數。
-
1-1:來源表格的單一發生次數,最多可以擁有目標表格對應的單一發生次數。
-
-
資料模型中定義的所有連結都會在畫布視圖中以箭頭表示。 請按一下兩個表格之間的箭頭,即可檢視詳細資訊,進行編輯,或可視需要移除連結。
-
使用工具列,即可自訂、調整您的畫布。
-
放大顯示:放大畫布,即可更清楚地檢視資料模式的詳細資料。
-
縮小顯示:縮小畫布大小,以便廣泛地檢視您的資料模式。
-
符合視圖:調整縮放,即可符合可見區域中的所有結構描述。
-
篩選器:請選擇想要顯示在畫布中的結構描述。
-
強制自動版面:自動排列結構描述,以便以更好的方式組織內容。
-
顯示地圖:切換迷你地圖覆蓋,即可協助瀏覽大型或複雜的結構描述版面配置。
-
全部展開/全部收合:快速展開或收合所有結構描述節點,以顯示或隱藏其屬性。
-
下載:以.png檔案格式下載ER圖表。
-
-
完成後,請按一下儲存。 此動作會建立結構描述和相關聯的資料集,並啟用資料集以用於協調的行銷活動。
-
請按一下開啟工作,以便監視建立工作的進度。 此流程可能需要幾分鐘的時間,全視 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)