how to add a constant value (1) in an empty column in snowflake-matillion

650 views Asked by At

my table looks like

id  total  avg  test_no
1   445     89 
2   434     85
3   378     75
4   421     84

I'm working on matillion-snowflake

I need my result to look like

id  total  avg  test_no
1   445     89   1
2   434     85   1
3   378     75   1
4   421     84   1
2

There are 2 answers

2
Gordon Linoff On

In Snowflake, you would modify the table using:

update t
    set test_no = 1;

I assume that Matillion supports this as well.

2
NickW On

Just use a Calculator component and set the value of the calculated column to 1