mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-13 01:38:35 +00:00
Add metadata health dao
This commit is contained in:
parent
e310dec688
commit
7250e028d5
@ -26,6 +26,7 @@ import wherehows.models.table.DictDataset;
|
|||||||
import wherehows.models.view.DatasetColumn;
|
import wherehows.models.view.DatasetColumn;
|
||||||
import wherehows.models.view.DatasetSchema;
|
import wherehows.models.view.DatasetSchema;
|
||||||
import wherehows.models.view.DatasetView;
|
import wherehows.models.view.DatasetView;
|
||||||
|
import wherehows.models.view.DatasetHealth;
|
||||||
|
|
||||||
import static org.apache.commons.lang3.StringUtils.*;
|
import static org.apache.commons.lang3.StringUtils.*;
|
||||||
import static wherehows.util.UrnUtil.*;
|
import static wherehows.util.UrnUtil.*;
|
||||||
@ -147,6 +148,14 @@ public class DatasetViewDao extends BaseViewDao {
|
|||||||
throw new UnsupportedOperationException("Not implemented yet");
|
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
|
* Get dataset column by dataset id and column id
|
||||||
* @param datasetId int
|
* @param datasetId int
|
||||||
|
|||||||
@ -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<DatasetValidation> validations;
|
||||||
|
}
|
||||||
@ -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;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user