Add null handling to agent table

This commit is contained in:
Anna Saiapina 2024-09-26 07:53:23 +00:00 committed by GCP Dataform
parent 1019b3e9c9
commit 04c7706b1a

View File

@ -25,7 +25,7 @@ with agent_status as (
then left(agent_name, strpos(AGENT_NAME, '-')-1)
else AGENT_NAME
end AGENT_NAME,
AGENT_GROUP,
COALESCE(AGENT_GROUP, '0') AGENT_GROUP,
case
when strpos(AGENT_NAME, '-- ') > 0
then upper(substr(AGENT_NAME, strpos(AGENT_NAME, '--') + 3))
@ -52,7 +52,7 @@ agent_digital as (
then left(agent_name, strpos(AGENT_NAME, '-')-1)
else AGENT_NAME
end AGENT_NAME,
AGENT_GROUP,
COALESCE(AGENT_GROUP, '0') AGENT_GROUP,
case
when strpos(AGENT_NAME, '-- ') > 0
then upper(substr(AGENT_NAME, strpos(AGENT_NAME, '--') + 3))
@ -78,7 +78,7 @@ agent_calls as (
then left(agent_name, strpos(AGENT_NAME, '-')-1)
else AGENT_NAME
end AGENT_NAME,
AGENT_GROUP,
COALESCE(AGENT_GROUP, '0') AGENT_GROUP,
case
when strpos(AGENT_NAME, '-- ') > 0
then upper(substr(AGENT_NAME, strpos(AGENT_NAME, '--') + 3))