use of com.thinkbiganalytics.metadata.rest.model.data.HiveTableDatasource in project kylo by Teradata.
the class MetadataClientTest method testBuildHiveTableDatasource.
// @Test
public void testBuildHiveTableDatasource() {
HiveTableDatasource ds = buildHiveTableDatasource("test-table").post();
assertThat(ds).isNotNull();
}
use of com.thinkbiganalytics.metadata.rest.model.data.HiveTableDatasource in project kylo by Teradata.
the class MetadataClientTest method testAddFeedDestination.
// @Test
public void testAddFeedDestination() throws ParseException {
Feed feed = buildFeed("category", "feed1").post();
HiveTableDatasource ds = buildHiveTableDatasource("test-table").post();
Feed result = client.addDestination(feed.getId(), ds.getId());
assertThat(result).isNotNull();
}
use of com.thinkbiganalytics.metadata.rest.model.data.HiveTableDatasource in project kylo by Teradata.
the class MetadataClientTest method testCheckPrecondition.
// @Test
public void testCheckPrecondition() throws ParseException {
Feed feedA = buildFeed("category", "feedA").post();
Feed feedB = buildFeed("category", "feedB", "category", "feedA").post();
HiveTableDatasource dsA = buildHiveTableDatasource("test-table").post();
feedA = client.addDestination(feedA.getId(), dsA.getId());
String destIdA = feedA.getDestinations().iterator().next().getId();
DataOperation op = client.beginOperation(destIdA, "");
op.setState(State.SUCCESS);
op.setDataset(new Dataset(new DateTime(), dsA, ChangeType.UPDATE, ContentType.PARTITIONS));
op = client.updateDataOperation(op);
ServiceLevelAssessment assmt = client.assessPrecondition(feedB.getId());
assertThat(assmt).isNotNull();
}
Aggregations