mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-01 13:13:10 +00:00
Fixed#7251: POST API calls to /usage endpoint are inconsistent (#7587)
* Fixed#7251: POST API calls to /usage endpoint are inconsistent * Fixed#7251: POST API calls to /usage endpoint are inconsistent
This commit is contained in:
parent
c522fa1de2
commit
2c0657fe68
@ -134,8 +134,12 @@ public class UsageRepository {
|
||||
// Insert usage record
|
||||
insertToUsageRepository(method, entityId, entityType, usage);
|
||||
Table updated = Entity.getEntity(Entity.TABLE, UUID.fromString(entityId), fields, Include.ALL);
|
||||
insertToUsageRepository(method, table.getDatabaseSchema().getId().toString(), Entity.DATABASE_SCHEMA, usage);
|
||||
insertToUsageRepository(method, table.getDatabase().getId().toString(), Entity.DATABASE, usage);
|
||||
dao.usageDAO()
|
||||
.insertOrUpdateCount(
|
||||
usage.getDate(), table.getDatabaseSchema().getId().toString(), Entity.DATABASE_SCHEMA, usage.getCount());
|
||||
dao.usageDAO()
|
||||
.insertOrUpdateCount(
|
||||
usage.getDate(), table.getDatabase().getId().toString(), Entity.DATABASE, usage.getCount());
|
||||
dao.usageDAO().computePercentile(entityType, usage.getDate());
|
||||
|
||||
ChangeDescription change =
|
||||
|
Loading…
x
Reference in New Issue
Block a user