docs: def get_output(db, output_id):
      """
      :param db: a :class:`openquake.server.dbapi.Db` instance
      :param output_id: ID of an Output object
      :returns: (ds_key, calc_id, dirname)
      """
      out = db('SELECT output.*, ds_calc_dir FROM output, job '
               'WHERE oq_job_id=job.id AND output.id=?x', output_id, one=True)
      return out.ds_key, out.oq_job_id, os.path.dirname(out.ds_calc_dir)