dump sql for derived knowledge data to file