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 polygon #414

Merged
merged 7 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 polygon.silver.traces RENAME TO polygon.silver.traces_old;
ALTER TABLE polygon.core.fact_traces RENAME TO polygon.core.fact_traces_old;

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

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

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

ALTER TABLE polygon.silver.overflowed_traces RENAME to polygon.silver.overflowed_traces_old;
ALTER TABLE polygon.silver.overflowed_traces2 RENAME to polygon.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 7d7873e into main Jan 29, 2025
@austinFlipside austinFlipside deleted the AN-5714/traces2-hotswap-polygon branch January 29, 2025 17:29
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