CDC 分隔器CDC Splitter

CDC 分隔器會將 CDC 來源資料流程中變更資料列的單一流程分割為插入、更新和刪除作業的不同資料流程。The CDC splitter splits a single flow of change rows from a CDC source data flow into different data flows for Insert, Update and Delete operations. 資料流程是根據 __$operation 變更資料表中的必要資料行 SQL Server 2017SQL Server 2017 及其標準值分割的。The data flow is split based on the required column __$operation and its standard values in SQL Server 2017SQL Server 2017 change tables.

作業值Value of Operation 輸出Output 描述Description
@shouldalert1 DELETEDelete 已刪除的資料列Deleted Row
22 InsertInsert 插入的資料列 (在使用 [Net with Merge (淨 (含合併))] CDC 模式時無法使用)Inserted row (not available when using Net with Merge CDC mode)
33 UpdateUpdate 更新前資料列 (僅在使用 [All with Old Values (全部 (含舊值))] CDC 模式時才可使用)Before-update row (available only when using All with Old Values CDC mode)
44 UpdateUpdate 更新後資料列 (在更新前之後)After-update row (follows the Before-update)
55 UpdateUpdate 合併資料列 (僅在使用 [Net with Merge (淨 (含合併))] CDC 模式時才可使用)Merge row (available only when using Net with Merge CDC mode)
其他Other 錯誤Error

您可以使用分隔器連接到預先定義的 INSERT、DELETE 和 UPDATE 輸出,以供進一步處理。You can use the splitter to connect to pre-defined INSERT, DELETE, and UPDATE outputs for further processing.

CDC 分隔器轉換有一個一般輸入和一個錯誤輸出。The CDC Splitter transformation has one regular input and one error output.

錯誤處理Error Handling

CDC 分隔器轉換有錯誤輸出。The CDC Splitter transformation has an error output. 含 $operation 資料行無效值的輸入資料列是視為錯誤的,會依據輸入的 ErrorRowDisposition 屬性來處理。Input rows with an invalid value of the $operation column are considered erroneous and are handled according to the ErrorRowDisposition property of the input.

此元件的錯誤輸出包含下列輸出資料行:The component error output includes the following output columns:

  • 錯誤碼:設為 1。Error Code: Set to 1.

  • 錯誤資料行:造成錯誤 (用於轉換錯誤) 的來源資料行。Error Column: The source column causing the error (for conversion errors).

  • 錯誤資料列資料行:造成錯誤之資料列的輸入資料行。Error Row Columns: The input columns of the row that caused the error.

設定 CDC 分隔器Configuring the CDC Splitter

CDC 分隔器沒有可設定的屬性。There are no configurable properties for the CDC splitter.

如需有關使用 CDC 分隔器的詳細資訊,請參閱<Microsoft SQL Server Integration Services 的 CDC 元件>。For more information about using the CDC splitter, see CDC Components for Microsoft SQL Server Integration Services.

[進階編輯器] 對話方塊包含可以程式設計方式設定的屬性。The Advanced Editor dialog box contains the properties that can be set programmatically.

若要開啟 [進階編輯器] 對話方塊:To open the Advanced Editor dialog box:

  • 專案的 [資料流程] SQL Server 2017 Integration Services (SSIS)SQL Server 2017 Integration Services (SSIS) 畫面中,以滑鼠右鍵按一下 CDC 分隔器,然後選取 [顯示進階編輯器]In the Data Flow screen of your SQL Server 2017 Integration Services (SSIS)SQL Server 2017 Integration Services (SSIS) project, right click the CDC splitter and select Show Advanced Editor.

另請參閱See Also

依據變更類型來導向 CDC 資料流Direct the CDC Stream According to the Type of Change