export datalog relations to couchdb