I have a table contains a few columns say: column_1, column_2 and column_3.
I appended an new column to the table called score. What I want to do is calculate the score based on these three columns and tune the parameters easily.
Say my score formula looks like below:
score = a * column_1 + b * column_2 + c * column_3
is it possible to create a udf or process(never used before) to easily do that?
so I have a function like getScore(a,b,c) and I could do something like:
select
column_1,
column_2,
column_3,
getScore(0.5, 0.1, 0.4) as score
from table
or
update table set score = getScore(0.5, 0.1, 0.4)
Thanks!