diff --git a/wherehows-dao/src/main/java/wherehows/dao/view/DatasetViewDao.java b/wherehows-dao/src/main/java/wherehows/dao/view/DatasetViewDao.java index 34fb4ef3b1..d87bc0642f 100644 --- a/wherehows-dao/src/main/java/wherehows/dao/view/DatasetViewDao.java +++ b/wherehows-dao/src/main/java/wherehows/dao/view/DatasetViewDao.java @@ -26,6 +26,7 @@ import wherehows.models.table.DictDataset; import wherehows.models.view.DatasetColumn; import wherehows.models.view.DatasetSchema; import wherehows.models.view.DatasetView; +import wherehows.models.view.DatasetHealth; import static org.apache.commons.lang3.StringUtils.*; import static wherehows.util.UrnUtil.*; @@ -147,6 +148,14 @@ public class DatasetViewDao extends BaseViewDao { throw new UnsupportedOperationException("Not implemented yet"); } + /** + * Get datset health by dataset urn + */ + @Nonnull + public DatasetHealth getDatasetHealth(@Nonnull String datasetUrn) throws Exception { + throw new UnsupportedOperationException("Not implemented yet"); + } + /** * Get dataset column by dataset id and column id * @param datasetId int diff --git a/wherehows-dao/src/main/java/wherehows/models/view/DatasetHealth.java b/wherehows-dao/src/main/java/wherehows/models/view/DatasetHealth.java new file mode 100644 index 0000000000..0f41570111 --- /dev/null +++ b/wherehows-dao/src/main/java/wherehows/models/view/DatasetHealth.java @@ -0,0 +1,29 @@ +/** + * Copyright 2015 LinkedIn Corp. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + */ +package wherehows.models.view; + +import java.util.List; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + + +@Setter +@Getter +@NoArgsConstructor +public class DatasetHealth { + private float score; + + private List validations; +} \ No newline at end of file diff --git a/wherehows-dao/src/main/java/wherehows/models/view/DatasetValidation.java b/wherehows-dao/src/main/java/wherehows/models/view/DatasetValidation.java new file mode 100644 index 0000000000..14eacfae1d --- /dev/null +++ b/wherehows-dao/src/main/java/wherehows/models/view/DatasetValidation.java @@ -0,0 +1,32 @@ +/** + * Copyright 2015 LinkedIn Corp. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + */ +package wherehows.models.view; + +import java.util.List; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +public class DatasetValidation { + + private String tier; + + private float score; + + private String description; + + private float weight; + + private String validator; +} \ No newline at end of file