Implement data fetching from RethinkDB