use of com.thinkbiganalytics.metadata.rest.model.data.DatasourceCriteria in project kylo by Teradata.
the class MetadataClientProvider method getDatasourceByName.
/* (non-Javadoc)
* @see com.thinkbiganalytics.controller.metadata.MetadataProvider#getDatasourceByName(java.lang.String)
*/
@Override
public Datasource getDatasourceByName(String dsName) {
DatasourceCriteria criteria = this.client.datasourceCriteria().name(dsName);
List<Datasource> list = this.client.getDatasources(criteria);
if (list.isEmpty()) {
return null;
} else {
return list.get(0);
}
}
Aggregations