From 52d562c5c4523987d859450b78d3d32c463c9f37 Mon Sep 17 00:00:00 2001 From: Anna Saiapina Date: Wed, 25 Sep 2024 14:10:46 +0000 Subject: [PATCH] Update row conditions --- definitions/staging/stg_agent_status_history_report.sqlx | 4 ++-- definitions/staging/stg_agent_status_report.sqlx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/definitions/staging/stg_agent_status_history_report.sqlx b/definitions/staging/stg_agent_status_history_report.sqlx index 1b7eed8..da4a4da 100644 --- a/definitions/staging/stg_agent_status_history_report.sqlx +++ b/definitions/staging/stg_agent_status_history_report.sqlx @@ -7,9 +7,9 @@ config { nonNull: ["AGENT_ID", "TIMESTAMP", "STATE"], rowConditions: [ 'STATE_GROUP <> "NOT_MAPPED"', - 'AGENT_ID <> "0" AND AGENT_NAME <> "NOT_MAPPED"', + 'AGENT_ID = "0" or (AGENT_ID <> "0" AND AGENT_NAME <> "NOT_MAPPED")', 'STATE_ID <> 0', - 'REASON_CODE is not null and REASON_CODE_ID <> 0' + 'REASON_CODE is null or (REASON_CODE is not null and REASON_CODE_ID <> 0)' ] }, tags: ["agent_status_report"], diff --git a/definitions/staging/stg_agent_status_report.sqlx b/definitions/staging/stg_agent_status_report.sqlx index 6568b87..9174c56 100644 --- a/definitions/staging/stg_agent_status_report.sqlx +++ b/definitions/staging/stg_agent_status_report.sqlx @@ -7,9 +7,9 @@ config { nonNull: ["AGENT_ID", "TIMESTAMP", "STATE"], rowConditions: [ 'STATE_GROUP <> "NOT_MAPPED"', - 'AGENT_ID <> "0" AND AGENT_NAME <> "NOT_MAPPED"', + 'AGENT_ID = "0" or (AGENT_ID <> "0" AND AGENT_NAME <> "NOT_MAPPED")', 'STATE_ID <> 0', - 'REASON_CODE is not null and REASON_CODE_ID <> 0' + 'REASON_CODE is null or (REASON_CODE is not null and REASON_CODE_ID <> 0)' ] }, tags: ["agent_status_report"],