use of io.hops.hopsworks.exceptions.DatasetException in project hopsworks by logicalclocks.
the class FeaturegroupService method provenance.
@Path("/{featureGroupId}/provenance")
public ProvArtifactResource provenance(@PathParam("featureGroupId") Integer featureGroupId) throws FeaturestoreException, GenericException {
DatasetPath targetEndpointPath;
try {
Dataset targetEndpoint = featurestoreController.getProjectFeaturestoreDataset(featurestore.getProject());
targetEndpointPath = datasetHelper.getTopLevelDatasetPath(project, targetEndpoint);
} catch (DatasetException ex) {
throw new GenericException(RESTCodes.GenericErrorCode.ILLEGAL_ARGUMENT, Level.FINE, "training dataset not found");
}
this.provenanceResource.setContext(project, targetEndpointPath);
Featuregroup fg = featuregroupController.getFeaturegroupById(featurestore, featureGroupId);
this.provenanceResource.setArtifactId(fg.getName(), fg.getVersion());
return provenanceResource;
}
Aggregations