增量查詢會挑選所有記錄,而非僅挑選新記錄
瞭解如何修正增量查詢無法如預期運作的Adobe Campaign Classic問題。
說明 description
環境
Campaign Classic
問題/症狀
增量查詢未按預期運作。 他們不是只擷取自上次執行以來的新記錄,而是每次都擷取所有記錄,就像正常的查詢活動一樣。
解決方法 resolution
Adobe Campaign Classic 20.1.1版(版本編號9122及更高版本)已修正此問題。
使用者可以使用的 因應措施:
因應措施1:停止清理工作流程,並間歇性執行以清理資料庫和硬碟,直到修復作業完成並可供使用為止。 如果您沒有計畫的升級,則不建議使用。
因應措施2:假設增量查詢活動受到影響。 執行與增量查詢相同的操作,建立持續綱要來儲存歷史記錄表格內容,以解決此問題。 使用查詢和更新資料活動的組合來模擬行為。 針對所有需要增量查詢的工作流程,這些工作流程都必須完成。
因應措施3: 假設增量查詢活動受到影響。 將稽核欄位tsCreated/tsLastModified新增到有問題的結構描述以解決此問題。 然後,您的增量查詢將轉換為具有Where子句(例如tscreated< GetDate())的正常查詢活動。
因應措施4:
- 建立新的序列
xtknewworkflowid,並將其初始化為遠離目前workflowId範圍的專案。 - 變更
xtkworkflow結構描述以使用此pkSequence。 - 要求使用者複製所有受影響的工作流程並刪除原始的工作流程。
- 當使用者準備好進行升級後,請透過將工作流程建立恢復為
xtknewId來移除此修正(以避免不想要的意外)。
原因
主要問題是清理工作流程。
增量查詢工作流程的運作方式如下:
- 維護含有先前版序結果的歷史記錄表格。
- 從目標查詢擷取所有列。
- 篩選出歷史記錄表格中的所有列
- 將剩餘的結果加入至歷史記錄表格中,以供下一個反複專案篩選使用。
歷史記錄工作表名稱包含下列記號:wkfhisto<workflowid> <activityName>_
現在,對於workflowID < 0 (對於xtknewid允許負數序列的使用者),我們看到它實際上是:
wkfhisto<(uint)workflowid> <activityName>_
Although this is okay for workflow execution.
So, for example, the incremental activity incremental1 of workflow ID=-1 will create a table wkfhisto4294967295_incremental1.
The thing which is missed is the CleanUp workflow.
Here, we have a code that tries to delete worktables of deleted workflows.
A dedicated code here lists all the wkfhisto tables, extracts the workflowId from their names (from the above convention), and deletes them all except the ones whose worklowIDs are found in the xtkworkflow table.
However, it misses the uint part.
So, it tries to look up a workflow with ID 4294967295 instead of casting this back to int. Since this workflow is not found, this table is deleted. Next time, when this workflow runs, the incremental query activity does not find an existing history table and creates it thinking of this as the first run ever.