partition key (#72)

This commit is contained in:
Austin 2024-09-12 15:22:33 -04:00 committed by GitHub
parent 689bf0b7c1
commit 49ed3dfae0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 11 additions and 60 deletions

View File

@ -1,47 +0,0 @@
name: dbt_run_temp_traces2
run-name: dbt_run_temp_traces2
on:
workflow_dispatch:
schedule:
# Runs “At minute 42 past every hour.” (see https://crontab.guru)
- cron: '42 * * * *'
env:
DBT_PROFILES_DIR: ./
ACCOUNT: "${{ vars.ACCOUNT }}"
ROLE: "${{ vars.ROLE }}"
USER: "${{ vars.USER }}"
PASSWORD: "${{ secrets.PASSWORD }}"
REGION: "${{ vars.REGION }}"
DATABASE: "${{ vars.DATABASE }}"
WAREHOUSE: "${{ vars.WAREHOUSE }}"
SCHEMA: "${{ vars.SCHEMA }}"
concurrency:
group: ${{ github.workflow }}
jobs:
run_dbt_jobs:
runs-on: ubuntu-latest
environment:
name: workflow_prod_2xl
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- name: install dependencies
run: |
pip install -r requirements.txt
dbt deps
- name: Run DBT Jobs
run: |
dbt run -m "blast_models,tag:traces_reload"

View File

@ -5,11 +5,10 @@
incremental_predicates = [fsc_evm.standard_predicate()],
cluster_by = "block_timestamp::date",
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION",
tags = ['traces_reload'],
tags = ['non_realtime','core'],
full_refresh = false
) }}
{{ fsc_evm.gold_traces_v1(
full_reload_start_block = 3000000,
full_reload_blocks = 1000000,
full_reload_mode = true
full_reload_blocks = 1000000
) }}

View File

@ -7,8 +7,9 @@
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION",
tags = ['non_realtime'],
full_refresh = false
) }}
) }}
{{ fsc_evm.silver_traces_v1(
full_reload_start_block = 3000000,
full_reload_blocks = 1000000
) }}
full_reload_blocks = 1000000,
use_partition_key = true
) }}

View File

@ -1,8 +1,7 @@
{{ config (
materialized = 'view'
) }}
{{ streamline_external_table_query_v2(
{{ fsc_evm.streamline_external_table_query(
model = "traces",
partition_function = "CAST(SPLIT_PART(SPLIT_PART(file_name, '/', 4), '_', 1) AS INTEGER )"
) }}

View File

@ -1,8 +1,7 @@
{{ config (
materialized = 'view'
) }}
{{ streamline_external_table_fr_query_v2(
{{ fsc_evm.streamline_external_table_fr_query(
model = "traces",
partition_function = "CAST(SPLIT_PART(SPLIT_PART(file_name, '/', 4), '_', 1) AS INTEGER )"
) }}

View File

@ -10,9 +10,9 @@ packages:
- package: get-select/dbt_snowflake_query_tags
version: 2.5.0
- git: https://github.com/FlipsideCrypto/fsc-evm.git
revision: 9326ce6c0b1a8fb7dbd9eb8c3f22a32628ff7883
revision: ec6adae14ab4060ad4a553fb7f32d7e57693996d
- package: calogica/dbt_date
version: 0.7.2
- git: https://github.com/FlipsideCrypto/livequery-models.git
revision: b024188be4e9c6bc00ed77797ebdc92d351d620e
sha1_hash: 33a323ebe67678ba663438f7b6a41ab7451ae3b6
sha1_hash: 622a679ecf98e6ebf3c904241902ce5328c77e52

View File

@ -10,4 +10,4 @@ packages:
- package: get-select/dbt_snowflake_query_tags
version: [">=2.0.0", "<3.0.0"]
- git: https://github.com/FlipsideCrypto/fsc-evm.git
revision: v1.3.0
revision: v1.5.0