Fix score_value conversion when two numbers are in the scoring text
This commit is contained in:
@@ -49,7 +49,7 @@ select
|
||||
row_number() over (order by user_id, task_name)::bigint as id,
|
||||
null::date as start,
|
||||
status,
|
||||
nullif(regexp_replace(overall_rating, '\D','','g'), '')::numeric as overall_rating_value,
|
||||
nullif(regexp_replace(overall_rating, '^(\d+).*', '\1'), '')::numeric as overall_rating_value,
|
||||
overall_rating as overall_rating_text,
|
||||
cycle_id,
|
||||
worker_id,
|
||||
|
||||
@@ -16,7 +16,7 @@ total_scores as (
|
||||
select
|
||||
r.review_id,
|
||||
t.section_name as dimension,
|
||||
nullif(regexp_replace(t.final_rating, '\D','','g'), '')::numeric as score_value,
|
||||
nullif(regexp_replace(t.final_rating, '^(\d+).*', '\1'), '')::numeric as score_value,
|
||||
nullif(trim(t.final_rating), '') as score_text,
|
||||
null::text as comment
|
||||
from {{ source('tap_spreadsheets_anywhere', 'performance_review_total_scoring') }} t
|
||||
|
||||
Reference in New Issue
Block a user