merge into {auth_user_groups_table_name} as target
using (select $1:id as id, $1:user_id as user_id, $1:group_id as group_id from {stage_path} (file_format => 'BASIC_PARQUET_LOADER', pattern => ('.*.parquet'))) as source
on (target.id = source.id)
when matched then update set target.user_id = source.user_id, target.group_id = source.group_id
when not matched then insert (id, user_id, group_id) values (source.id, source.user_id, source.group_id);

