Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,20 +462,20 @@ livequery:

To control the creation of UDF or SP macros with dbt run:

* UPDATE_UDFS_AND_SPS
* LQ_UPDATE_UDFS_AND_SPS
When True, executes all macros included in the on-run-start hooks within dbt_project.yml on model run as normal
When False, none of the on-run-start macros are executed on model run

Default values are False

* Usage:
`dbt run --vars '{"UPDATE_UDFS_AND_SPS":True}' -m ...`
`dbt run --var '{"LQ_UPDATE_UDFS_AND_SPS":True}' -m ...`

Dropping and creating udfs can also be done without running a model:

```sh
dbt run-operation create_udfs --vars '{"UPDATE_UDFS_AND_SPS":True}' --args '{"drop_":false}'
dbt run-operation create_udfs --vars '{"UPDATE_UDFS_AND_SPS":True}' --args '{"drop_":true}'
dbt run-operation create_udfs --vars '{"LQ_UPDATE_UDFS_AND_SPS":True}' --args '{"drop_":false}'
dbt run-operation create_udfs --vars '{"LQ_UPDATE_UDFS_AND_SPS":True}' --args '{"drop_":true}'
```

## Resources
Expand Down
44 changes: 41 additions & 3 deletions dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,43 @@ models:
+tags: evm
marketplace:
+tags: marketplace
overrides:
+materialized: ephemeral
fsc_evm:
+enabled: false # disable package by default
+materialized: ephemeral
decoder_package:
decoded_logs:
gold:
core__ez_decoded_event_logs:
+enabled: true
silver:
silver__decoded_logs:
+enabled: true
main_package:
core:
gold:
core__fact_blocks:
+enabled: true
core__fact_transactions:
+enabled: true
core__fact_event_logs:
+enabled: true
core__fact_traces:
+enabled: true
core__ez_native_transfers:
+enabled: true
core__ez_token_transfers:
+enabled: true
silver:
silver__blocks:
+enabled: true
silver__transactions:
+enabled: true
silver__receipts:
+enabled: true
silver__traces:
+enabled: true

tests:
+store_failures: true # all tests
Expand All @@ -40,7 +77,7 @@ tests:
marketplace:
blockpour:
# TODO: enable tests for blockpour once we get an API key
+enabled: false
+enabled: false

on-run-start:
- "{{ create_sps() }}"
Expand All @@ -57,7 +94,7 @@ on-run-end:

vars:
"dbt_date:time_zone": GMT
UPDATE_UDFS_AND_SPS: false
LQ_UPDATE_UDFS_AND_SPS: false
DROP_UDFS_AND_SPS: false
UPDATE_SNOWFLAKE_TAGS: true
STREAMLINE_INVOKE_STREAMS: False
Expand All @@ -67,9 +104,10 @@ vars:
API_INTEGRATION: '{{ var("config")[target.name]["API_INTEGRATION"] }}'
EXTERNAL_FUNCTION_URI: '{{ var("config")[target.name]["EXTERNAL_FUNCTION_URI"] }}'
ROLES: '{{ var("config")[target.name]["ROLES"] }}'
GLOBAL_PROD_DB_NAME: 'LIVEQUERY_DEV'

config:
# The keys correspond to dbt profiles and are case sensitive
# The keys correspond to dbt profiles and are case sensitive
dev:
API_INTEGRATION: AWS_LIVE_QUERY_STG
EXTERNAL_FUNCTION_URI: u5z0tu43sc.execute-api.us-east-1.amazonaws.com/stg/
Expand Down
2 changes: 1 addition & 1 deletion macros/create_sps.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% macro create_sps() %}
{% if var("UPDATE_UDFS_AND_SPS") %}
{% if var("LQ_UPDATE_UDFS_AND_SPS") %}
{% if target.database == 'LIVEQUERY' %}
CREATE schema IF NOT EXISTS _internal;
{{ sp_create_prod_clone('_internal') }};
Expand Down
167 changes: 79 additions & 88 deletions macros/evm/evm.yaml.sql

Large diffs are not rendered by default.

Loading