From ccc070b43f082eb30b51c0959761d34c79c68015 Mon Sep 17 00:00:00 2001 From: Austin Date: Thu, 10 Oct 2024 15:37:26 -0400 Subject: [PATCH] stash --- dbt_project.yml | 25 ++++++++++++--- .../history/streamline__traces_history.sql | 6 +--- ...reamline__blocks_transactions_realtime.sql | 5 +-- .../realtime/streamline__traces_realtime.sql | 5 +-- package-lock.yml | 10 ++++++ packages.yml | 7 +++++ profiles.yml | 31 +++++++++++++++++++ requirements.txt | 2 ++ 8 files changed, 73 insertions(+), 18 deletions(-) create mode 100644 package-lock.yml create mode 100644 packages.yml create mode 100644 profiles.yml create mode 100644 requirements.txt diff --git a/dbt_project.yml b/dbt_project.yml index 7f5fe410..e773d320 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -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 @@ -35,4 +32,22 @@ tests: # using the `{{ config(...) }}` macro. vars: - "dbt_date:time_zone": GMT \ No newline at end of file + "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 \ No newline at end of file diff --git a/models/core_package/streamline/history/streamline__traces_history.sql b/models/core_package/streamline/history/streamline__traces_history.sql index a9b86e2c..f3caa16f 100644 --- a/models/core_package/streamline/history/streamline__traces_history.sql +++ b/models/core_package/streamline/history/streamline__traces_history.sql @@ -1,5 +1,3 @@ -{%- if var('GLOBAL_USES_V2_FSC_EVM', False) -%} - {% set model_name = 'TRACES' %} {% set model_type = 'HISTORY' %} @@ -98,6 +96,4 @@ FROM {{ default_vars['order_by_clause'] }} -LIMIT {{ streamline_params['sql_limit'] }} - -{%- endif -%} \ No newline at end of file +LIMIT {{ streamline_params['sql_limit'] }} \ No newline at end of file diff --git a/models/core_package/streamline/realtime/streamline__blocks_transactions_realtime.sql b/models/core_package/streamline/realtime/streamline__blocks_transactions_realtime.sql index 1cb491a7..799866d8 100644 --- a/models/core_package/streamline/realtime/streamline__blocks_transactions_realtime.sql +++ b/models/core_package/streamline/realtime/streamline__blocks_transactions_realtime.sql @@ -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) -%} @@ -112,6 +111,4 @@ FROM {{ default_vars['order_by_clause'] }} -LIMIT {{ streamline_params['sql_limit'] }} - -{%- endif -%} \ No newline at end of file +LIMIT {{ streamline_params['sql_limit'] }} \ No newline at end of file diff --git a/models/core_package/streamline/realtime/streamline__traces_realtime.sql b/models/core_package/streamline/realtime/streamline__traces_realtime.sql index 440cfe1e..91ce060a 100644 --- a/models/core_package/streamline/realtime/streamline__traces_realtime.sql +++ b/models/core_package/streamline/realtime/streamline__traces_realtime.sql @@ -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) -%} @@ -111,6 +110,4 @@ FROM {{ default_vars['order_by_clause'] }} -LIMIT {{ streamline_params['sql_limit'] }} - -{%- endif -%} \ No newline at end of file +LIMIT {{ streamline_params['sql_limit'] }} \ No newline at end of file diff --git a/package-lock.yml b/package-lock.yml new file mode 100644 index 00000000..4436da4a --- /dev/null +++ b/package-lock.yml @@ -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 diff --git a/packages.yml b/packages.yml new file mode 100644 index 00000000..9cbecda4 --- /dev/null +++ b/packages.yml @@ -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 \ No newline at end of file diff --git a/profiles.yml b/profiles.yml new file mode 100644 index 00000000..984fa648 --- /dev/null +++ b/profiles.yml @@ -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 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..39b82bb1 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +dbt-snowflake>=1.7,<1.8 +protobuf==4.25.3 \ No newline at end of file