code: def delete_resource_attribute(resource_attr_id, **kwargs):
      
      user_id = kwargs.get('user_id')
      try:
          ra = db.DBSession.query(ResourceAttr).filter(ResourceAttr.id == resource_attr_id).one()
      except NoResultFound:
          raise ResourceNotFoundError("Resource Attribute %s not found"%(resource_attr_id))
  
      ra.check_write_permission(user_id)
      db.DBSession.delete(ra)
      db.DBSession.flush()
      return 'OK'
docs: Deletes a resource attribute and all associated data.