tool of input and output in csv from database