I have a large dataset with the following columns
id,
token1,
token2,
token4,
record
Now someone gave me a list of changes to be done to this table.
if token1 = xxx and token2 = yyy and token4 = zzz
change record to some another value kkk
like this i have another 100k changes need to be done.
so they have given a csv file as
token1,token2,token4,record
xxxx,yyy,zzzz,kkk..
...
100K changes
Whats the best way to deal in this situation
My plan is
- create a for loop in python
- loop through each line in the csv file,
- check if record exists then change the recordid to the corresponding recordid mentioned.
Can someone suggest whats the best way to do a bulk update with multiple where conditions.
I have to do this task on snowflake