near-models/dbt_project.yml
Jack Forgash ebab6bebab add uri
2025-02-14 10:27:32 -07:00

112 lines
3.5 KiB
YAML

# Name your project! Project names should contain only lowercase characters
# and underscores. A good package name should reflect your organization's
# name or the intended use of these models
name: "near_models"
version: "1.2.0"
config-version: 2
# This setting configures which "profile" dbt uses for this project.
profile: "near"
require-dbt-version: ">=1.7.0"
# These configurations specify where dbt should look for different types of files.
# The `source-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
model-paths: ["models"]
analysis-paths: ["analysis"]
test-paths: ["tests"]
seed-paths: ["data"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by `dbt clean`
- "target"
- "dbt_modules"
- "dbt_packages"
on-run-start:
- "{{ create_udfs() }}"
- "{{create_sps()}}"
- "{{create_get_nearblocks_fts()}}"
on-run-end:
- "{{ apply_meta_as_tags(results) }}"
# Configuring models
# Full documentation: https://docs.getdbt.com/docs/configuring-models
# In this example config, we tell dbt to build all models in the example/ directory
# as tables. These settings can be overridden in the individual model files
# using the `{{ config(...) }}` macro.
models:
+copy_grants: True
+persist_docs:
relation: True
columns: True
+on_schema_change: "append_new_columns"
near_models:
+pre-hook: '{{ fsc_utils.set_query_tag() }}'
livequery_models:
deploy:
core:
materialized: ephemeral
tests:
near:
silver:
+error_if: ">100" # only raise as error if >100, otherwise warn
+store_failures: True # all 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
MANUAL_FIX: False
OBSERV_FULL_TEST: False
DBT_FULL_TEST: False
STREAMLINE_LOAD_LOOKBACK_HOURS: 3
RECEIPT_MAP_LOOKBACK_HOURS: 6
IS_MIGRATION: False
HEAL_MODELS: []
core_folders: [
'silver/streamline',
'silver/actions',
'gold/core',
'streamline'
]
API_INTEGRATION: '{{ var("config")[target.name]["API_INTEGRATION"] }}'
EXTERNAL_FUNCTION_URI: '{{ var("config")[target.name]["EXTERNAL_FUNCTION_URI"] }}'
API_AWS_ROLE_ARN: '{{ var("config")[target.name]["API_AWS_ROLE_ARN"] if var("config")[target.name] else var("config")["dev"]["API_AWS_ROLE_ARN"] }}'
ROLES: '{{ var("config")[target.name]["ROLES"] }}'
config:
# The keys correspond to dbt profiles and are case sensitive
dev:
API_INTEGRATION: AWS_NEAR_API_STG_V2
EXTERNAL_FUNCTION_URI: cx7cyhtcjf.execute-api.us-east-1.amazonaws.com/stg/
API_AWS_ROLE_ARN: arn:aws:lambda:us-east-1:704693948482:function:near-api-stg-APIHandler-JIPzugohypYl
ROLES:
- AWS_LAMBDA_NEAR_API
- INTERNAL_DEV
prod:
API_INTEGRATION: AWS_NEAR_API_PROD_V2
EXTERNAL_FUNCTION_URI: https://ygnnkauzn2.execute-api.us-east-1.amazonaws.com/prod/
API_AWS_ROLE_ARN: arn:aws:lambda:us-east-1:924682671219:function:near-api-prod-APIHandler-926uy1lxE2Sa
ROLES:
- AWS_LAMBDA_NEAR_API
- DBT_CLOUD_NEAR
dispatch:
- macro_namespace: dbt
search_order:
- near-models
- dbt_snowflake_query_tags
- dbt
query-comment:
comment: "{{ dbt_snowflake_query_tags.get_query_comment(node) }}"
append: true # Snowflake removes prefixed comments.