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

An 5714/traces2 hotswap bsc #306

Merged
merged 5 commits into from
Jan 29, 2025
Merged

Conversation

sam-xyz
Copy link
Member

@sam-xyz sam-xyz commented Jan 24, 2025

Hotswap of traces2 to traces

  1. change models that refer to silver__traces to the new gold traces table.
  2. Only change necessary columns like eth_value -> value . Columns like tx_status remain unchanged.
  3. old models are renamed to have _old suffix
  4. Also removed traces2 workflow and commented out fix model
  5. All gold tests and change silver tests
  6. Rename traces2 workflow if applicable

need to run these statements:
ALTER TABLE bsc.silver.traces RENAME TO bsc.silver.traces_old;
ALTER TABLE bsc.core.fact_traces RENAME TO bsc.core.fact_traces_old;

ALTER TABLE bsc.silver.traces2 RENAME TO bsc.silver.traces;
ALTER TABLE bsc.silver.fact_traces2 RENAME TO bsc.core.fact_traces;

For overflow:
ALTER TABLE bsc.bronze.overflowed_traces RENAME to bsc.bronze.overflowed_traces_old;
ALTER TABLE bsc.bronze.overflowed_traces2 RENAME to bsc.bronze.overflowed_traces;

ALTER TABLE bsc.bronze.potential_overflowed_traces RENAME to bsc.bronze.potential_overflowed_traces_old;
ALTER TABLE bsc.bronze.potential_overflowed_traces2 RENAME to bsc.bronze.potential_overflowed_traces;

ALTER TABLE bsc.silver.overflowed_traces RENAME to bsc.silver.overflowed_traces_old;
ALTER TABLE bsc.silver.overflowed_traces2 RENAME to bsc.silver.overflowed_traces;

Requires running dbt run -m models/gold/core/tests/traces models/silver/core/tests/traces --full-refresh to create gold tests

@austinFlipside austinFlipside merged commit fe59cde into main Jan 29, 2025
@austinFlipside austinFlipside deleted the AN-5714/traces2-hotswap-bsc branch January 29, 2025 17:17
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