This commit is contained in:
Austin 2024-10-10 15:37:26 -04:00
parent f0f035472b
commit ccc070b43f
8 changed files with 73 additions and 18 deletions

View File

@ -6,7 +6,7 @@ version: '1.0.0'
config-version: 2
# This setting configures which "profile" dbt uses for this project.
# profile: 'fsc_evm'
profile: 'fsc_evm'
# These configurations specify where dbt should look for different types of files.
# The `model-paths` config, for example, states that models in this project can be
@ -24,9 +24,6 @@ clean-targets: # directories to be removed by `dbt clean`
- "dbt_modules"
- "dbt_packages"
tests:
+store_failures: true # all tests
# Configuring models
# Full documentation: https://docs.getdbt.com/docs/configuring-models
@ -36,3 +33,21 @@ tests:
vars:
"dbt_date:time_zone": GMT
STREAMLINE_INVOKE_STREAMS: False
STREAMLINE_USE_DEV_FOR_EXTERNAL_TABLES: False
UPDATE_UDFS_AND_SPS: False
UPDATE_SNOWFLAKE_TAGS: True
OBSERV_FULL_TEST: False
WAIT: 0
HEAL_MODEL: False
HEAL_MODELS: []
START_GHA_TASKS: False
### GLOBAL VARIABLES
GLOBAL_PROD_DB_NAME: 'core'
GLOBAL_NODE_SECRET_PATH: 'Vault/prod/core/ankr/mainnet'
GLOBAL_BLOCKS_PER_HOUR: 1200
### PRICES ###
PRICES_SYMBOLS: 'CORE' ### REQUIRED
PRICES_PLATFORMS: ['Core', 'core'] ### REQUIRED

View File

@ -1,5 +1,3 @@
{%- if var('GLOBAL_USES_V2_FSC_EVM', False) -%}
{% set model_name = 'TRACES' %}
{% set model_type = 'HISTORY' %}
@ -99,5 +97,3 @@ FROM
{{ default_vars['order_by_clause'] }}
LIMIT {{ streamline_params['sql_limit'] }}
{%- endif -%}

View File

@ -1,4 +1,3 @@
{%- if var('GLOBAL_USES_V2_FSC_EVM', False) -%}
{% set model_name = 'BLOCKS_TRANSACTIONS' %}
{% set model_type = 'REALTIME' %}
{%- set min_block = var('GLOBAL_START_UP_BLOCK', none) -%}
@ -113,5 +112,3 @@ FROM
{{ default_vars['order_by_clause'] }}
LIMIT {{ streamline_params['sql_limit'] }}
{%- endif -%}

View File

@ -1,4 +1,3 @@
{%- if var('GLOBAL_USES_V2_FSC_EVM', False) -%}
{% set model_name = 'TRACES' %}
{% set model_type = 'REALTIME' %}
{%- set min_block = var('GLOBAL_START_UP_BLOCK', none) -%}
@ -112,5 +111,3 @@ FROM
{{ default_vars['order_by_clause'] }}
LIMIT {{ streamline_params['sql_limit'] }}
{%- endif -%}

10
package-lock.yml Normal file
View File

@ -0,0 +1,10 @@
packages:
- package: calogica/dbt_expectations
version: 0.8.2
- package: dbt-labs/dbt_external_tables
version: 0.8.2
- package: dbt-labs/dbt_utils
version: 1.0.0
- package: calogica/dbt_date
version: 0.7.2
sha1_hash: d2159dfc4baaed0d8bc6e08cab1bf73fb8128190

7
packages.yml Normal file
View File

@ -0,0 +1,7 @@
packages:
- package: calogica/dbt_expectations
version: 0.8.2
- package: dbt-labs/dbt_external_tables
version: 0.8.2
- package: dbt-labs/dbt_utils
version: 1.0.0

31
profiles.yml Normal file
View File

@ -0,0 +1,31 @@
fsc_evm:
target: prod
outputs:
dev:
type: snowflake
account: "{{ env_var('ACCOUNT') }}"
role: "{{ env_var('ROLE') }}"
user: "{{ env_var('USER') }}"
password: "{{ env_var('PASSWORD') }}"
region: "{{ env_var('REGION') }}"
database: "{{ env_var('DATABASE') }}"
warehouse: "{{ env_var('WAREHOUSE') }}"
schema: SILVER
threads: 4
client_session_keep_alive: False
query_tag: curator
prod:
type: snowflake
account: "{{ env_var('ACCOUNT') }}"
role: "{{ env_var('ROLE') }}"
user: "{{ env_var('USER') }}"
password: "{{ env_var('PASSWORD') }}"
region: "{{ env_var('REGION') }}"
database: "{{ env_var('DATABASE') }}"
warehouse: "{{ env_var('WAREHOUSE') }}"
schema: SILVER
threads: 4
client_session_keep_alive: False
query_tag: curator
config:
send_anonymous_usage_stats: False

2
requirements.txt Normal file
View File

@ -0,0 +1,2 @@
dbt-snowflake>=1.7,<1.8
protobuf==4.25.3