add kmeans macro
macro record update and insert query