Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: update the event table schema #277

Merged
merged 1 commit into from
Mar 6, 2023

Conversation

hawyar
Copy link
Contributor

@hawyar hawyar commented Mar 6, 2023

I propose a few changes to our events schema. The goal is to reduce unnecessary columns which greatly reduces our query execution time with Athena and overall maintain a clean structure that captures all the properties we need at the moment.

@elizyoung0011 has approved these new changes.

Before

{
  "chain": "ethereum",
  "network": "mainnet",
  "provider": "alchemy",
  "type": "transaction",
  "height": 14000000,
  "block": "0x3dac2080b4c423029fcc9c916bc430cde441badfe736fc6d1fe9325348af80fd",
  "transaction": "0x3dac2080b4c423029fcc9c916bc430cde441badfe736fc6d1fe9325348af80fd",
  "received_at": "2022-01-13 17:59:55",
  "address": "0xdE1c59Bc25D806aD9DdCbe246c4B5e5505645718",
  "to_address": "0x9008D19f58AAbD9eD0D60971565AA8510560ab41",
  "address_balance": 6914491516723917000,
  "to_address_balance": 642683257089854800,
  "amount": 0, 
  "gas_used": "",
  "gas_limit": "",
  "base_fee": "",
  "burnt_fee": "",
  "validator": ""
  "validator_list": "",
  "duration": "",
  "auto_stake": ""
}

After

{
  "chain": "ethereum",
  "network": "mainnet",
  "provider": "alchemy",
  "type": "transaction",
  "height": 14000000,
  "block": "0x3dac2080b4c423029fcc9c916bc430cde441badfe736fc6d1fe9325348af80fd",
  "transaction": "0x3dac2080b4c423029fcc9c916bc430cde441badfe736fc6d1fe9325348af80fd",
  "received_at": "2022-01-13 17:59:55",
  "sender": "0xdE1c59Bc25D806aD9DdCbe246c4B5e5505645718",
  "recipient": "0x9008D19f58AAbD9eD0D60971565AA8510560ab41",
  "sender_balance": 6914491516723917000,
  "recipient_balance": 642683257089854800,
  "amount": 0,
  "price": 1692.5
}

@hawyar hawyar requested a review from shanejearley March 6, 2023 19:30
@shanejearley
Copy link
Contributor

Incredible work, going to merge now.

@shanejearley shanejearley merged commit db559c3 into develop Mar 6, 2023
@shanejearley shanejearley deleted the feature/event-schema-proposal branch March 6, 2023 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants