Change material and save it

how about use data table?