Search in sources :

Example 1 with TableNotFoundException

use of bio.terra.service.dataset.exception.TableNotFoundException in project jade-data-repo by DataBiosphere.

the class IngestUtils method getDatasetTable.

public static DatasetTable getDatasetTable(FlightContext context, Dataset dataset) {
    IngestRequestModel ingestRequest = getIngestRequestModel(context);
    Optional<DatasetTable> optTable = dataset.getTableByName(ingestRequest.getTable());
    if (!optTable.isPresent()) {
        throw new TableNotFoundException("Table not found: " + ingestRequest.getTable());
    }
    return optTable.get();
}
Also used : TableNotFoundException(bio.terra.service.dataset.exception.TableNotFoundException) IngestRequestModel(bio.terra.model.IngestRequestModel) DatasetTable(bio.terra.service.dataset.DatasetTable)

Aggregations

IngestRequestModel (bio.terra.model.IngestRequestModel)1 DatasetTable (bio.terra.service.dataset.DatasetTable)1 TableNotFoundException (bio.terra.service.dataset.exception.TableNotFoundException)1