docs: def get_dimension_from_db_by_name(dimension_name):
      """
          Gets a dimension from the DB table.
      """
      try:
          dimension = db.DBSession.query(Dimension).filter(Dimension.name==dimension_name).one()
          return JSONObject(dimension)
      except NoResultFound:
          raise ResourceNotFoundError("Dimension %s not found"%(dimension_name))