Understanding Logic for Usage Aggregations in the UI and Resolving Duplicated Values

Original Slack Thread

Hi, can someone tell me how the logic for the usage aggregations shown in the UI works?
I have the following use case: I’ve created a custom ingestion/script to add the (monthly) usage for some datasets (including the number of queries per field). The problem is that every time I emit new data the usage shown in the UI is showing the total of every usage emitted. I would like to only show the last value emitted

Example, If I emit the usage for this field once, it shows the only value 672602 , but if I emit it again, it shows the value duplicated![attachment]({‘ID’: ‘F07186CB0KF’, ‘EDITABLE’: False, ‘IS_EXTERNAL’: False, ‘USER_ID’: ‘U0252SYSBS7’, ‘CREATED’: ‘2024-04-30 13:02:27+00:00’, ‘PERMALINK’: ‘Slack’, ‘EXTERNAL_TYPE’: ‘’, ‘TIMESTAMPS’: ‘2024-04-30 13:02:27+00:00’, ‘MODE’: ‘hosted’, ‘DISPLAY_AS_BOT’: False, ‘PRETTY_TYPE’: ‘PNG’, ‘NAME’: ‘image.png’, ‘IS_PUBLIC’: True, ‘PREVIEW_HIGHLIGHT’: None, ‘MIMETYPE’: ‘image/png’, ‘PERMALINK_PUBLIC’: ‘https://slack-files.com/TUMKD5EGJ-F07186CB0KF-02a43176e9’, ‘FILETYPE’: ‘png’, ‘EDIT_LINK’: None, ‘URL_PRIVATE’: ‘Slack’, ‘HAS_RICH_PREVIEW’: False, ‘TITLE’: ‘image.png’, ‘IS_STARRED’: False, ‘PREVIEW_IS_TRUNCATED’: None, ‘URL_PRIVATE_DOWNLOAD’: ‘Slack’, ‘PREVIEW’: None, ‘PUBLIC_URL_SHARED’: False, ‘MESSAGE_TS’: ‘1714482251.528409’, ‘PARENT_MESSAGE_TS’: ‘1714482142.960959’, ‘MESSAGE_CHANNEL_ID’: ‘CV2UXSE9L’, ‘_FIVETRAN_DELETED’: False, ‘LINES_MORE’: None, ‘LINES’: None, ‘SIZE’: 9531, ‘_FIVETRAN_SYNCED’: ‘2024-05-05 12:21:22.007000+00:00’})