Open youngsofun opened 1 month ago
Summary
copy into <dest_table> from <location> transform (<col_name1> <expr1>, <col_name2> <expr2>,)
suppose table1 has 100 columns. user want to transform 2 columns. he can just use
copy into table1 from @stage1 transform (c3 if(c3 <0, 0, c3), c80 trim(c80))
instead of
copy into table1 from @stage1 from (select c1, c2, if(c3 <0, 0, c3), .... trim(c80) .... from @stage1)
cc @wubx
This is a bit complicated, I think the Query stage will do.
copy into o table1 from (select $1,$2, if($3<0,0,c3) from @stage) file_format=(type=csv compression=auto) purge=true;
Summary
suppose table1 has 100 columns. user want to transform 2 columns. he can just use
instead of