use of com.qlangtech.tis.sql.parser.meta.DependencyNode in project tis by qlangtech.
the class DataFlowAppSource method getTargetEntity.
@Override
public EntityName getTargetEntity() {
try {
SqlTaskNodeMeta.SqlDataFlowTopology workflowDetail = SqlTaskNodeMeta.getSqlDataFlowTopology(dataflowName);
Objects.requireNonNull(workflowDetail, "workflowDetail can not be null");
EntityName targetEntity = null;
if (workflowDetail.isSingleTableModel()) {
DependencyNode dumpNode = workflowDetail.getDumpNodes().get(0);
targetEntity = dumpNode.parseEntityName();
} else {
SqlTaskNodeMeta finalN = workflowDetail.getFinalNode();
targetEntity = EntityName.parse(finalN.getExportName());
}
return targetEntity;
} catch (Exception e) {
throw new RuntimeException(dataflowName, e);
}
}
Aggregations