Skip to content

Commit

Permalink
restrict to single model graph for data ingestion
Browse files Browse the repository at this point in the history
  • Loading branch information
saratge committed Aug 28, 2023
1 parent 38ab6fe commit 48c7dbc
Showing 1 changed file with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,17 @@ private IngestionStatus uploadDataFromYAML(String yamlPath, IProgressMonitor mon
}
}

if (yamlMap.containsKey("model-graph")) {
Object oDataGraph = yamlMap.get("model-graph");
if (oDataGraph instanceof String && !((String) oDataGraph).isEmpty()) {
modelGraph = (String) oDataGraph;
if (yamlMap.containsKey("model-graphs")) {
Object oDataGraph = yamlMap.get("model-graphs");
if (oDataGraph instanceof List) {
if (((List) oDataGraph).size() > 1) {
RackConsole.getConsole().error("We currently support ingesting only using a single model-graph");
return IngestionStatus.FAILED;
}
modelGraph = ((List<String>) oDataGraph).get(0);
if (modelGraph.isEmpty()) {
modelGraph = mGraphs.get(0);
}
// validate target graph against footprint
if (!mGraphs.contains(modelGraph)) {
RackConsole.getConsole()
Expand Down Expand Up @@ -689,8 +696,8 @@ private IngestionStatus uploadInstanceDataCSV(String ingestionId, ArrayList<Stri
}
}
});
if(status != null && status == IngestionStatus.FAILED) {

if (status != null && status == IngestionStatus.FAILED) {
return status;
}

Expand Down

0 comments on commit 48c7dbc

Please sign in to comment.