Generate sql to dict
clean type fix