mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-01 13:13:10 +00:00
feat: added getLatestRecord for extension (#18797)
This commit is contained in:
parent
c101c7cf30
commit
e58efdde67
@ -282,6 +282,16 @@ public abstract class EntityTimeSeriesRepository<T extends EntityTimeSeriesInter
|
||||
return entityRecord;
|
||||
}
|
||||
|
||||
public T getLatestRecord(String recordFQN, String extension) {
|
||||
String jsonRecord = timeSeriesDao.getLatestExtension(recordFQN, extension);
|
||||
if (jsonRecord == null) {
|
||||
return null;
|
||||
}
|
||||
T entityRecord = JsonUtils.readValue(jsonRecord, entityClass);
|
||||
setInheritedFields(entityRecord);
|
||||
return entityRecord;
|
||||
}
|
||||
|
||||
public T getById(UUID id) {
|
||||
String jsonRecord = timeSeriesDao.getById(id);
|
||||
if (jsonRecord == null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user