Search in sources :

Example 1 with FeedDependencyGraph

use of com.thinkbiganalytics.metadata.rest.model.feed.FeedDependencyGraph in project kylo by Teradata.

the class FeedsController method collectFeedDependencies.

private FeedDependencyGraph collectFeedDependencies(com.thinkbiganalytics.metadata.api.feed.Feed currentFeed, boolean assessPrecond) {
    List<com.thinkbiganalytics.metadata.api.feed.Feed> domainDeps = currentFeed.getDependentFeeds();
    FeedDependencyGraph feedDep = new FeedDependencyGraph(this.metadataTransform.domainToFeed().apply(currentFeed), null);
    if (!domainDeps.isEmpty()) {
        for (com.thinkbiganalytics.metadata.api.feed.Feed depFeed : domainDeps) {
            FeedDependencyGraph childDep = collectFeedDependencies(depFeed, assessPrecond);
            feedDep.addDependecy(childDep);
        }
    }
    if (assessPrecond && currentFeed.getPrecondition() != null) {
        feedDep.setPreconditonResult(generateModelAssessment(currentFeed.getPrecondition()));
    }
    return feedDep;
}
Also used : FeedDependencyGraph(com.thinkbiganalytics.metadata.rest.model.feed.FeedDependencyGraph) Feed(com.thinkbiganalytics.metadata.rest.model.feed.Feed)

Aggregations

Feed (com.thinkbiganalytics.metadata.rest.model.feed.Feed)1 FeedDependencyGraph (com.thinkbiganalytics.metadata.rest.model.feed.FeedDependencyGraph)1