2022-01-12 19:15:26 +00:00
|
|
|
# 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"
|
2022-08-29 18:40:22 +00:00
|
|
|
version: "1.2.0"
|
2022-01-12 19:15:26 +00:00
|
|
|
config-version: 2
|
|
|
|
|
|
|
|
|
|
# This setting configures which "profile" dbt uses for this project.
|
2022-05-25 04:56:10 +00:00
|
|
|
profile: "near"
|
2022-01-12 19:15:26 +00:00
|
|
|
|
|
|
|
|
# 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!
|
2022-05-25 04:56:10 +00:00
|
|
|
model-paths: ["models"]
|
2022-01-12 19:15:26 +00:00
|
|
|
analysis-paths: ["analysis"]
|
|
|
|
|
test-paths: ["tests"]
|
2022-05-25 04:56:10 +00:00
|
|
|
seed-paths: ["data"]
|
2022-01-12 19:15:26 +00:00
|
|
|
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"
|
2022-05-25 04:56:10 +00:00
|
|
|
- "dbt_packages"
|
2022-01-12 19:15:26 +00:00
|
|
|
|
2022-07-12 18:55:52 +00:00
|
|
|
on-run-start:
|
2023-01-20 02:43:55 +00:00
|
|
|
- "{{ create_udfs() }}"
|
2022-07-12 18:55:52 +00:00
|
|
|
- "{{create_sps()}}"
|
2023-01-03 21:32:31 +00:00
|
|
|
- "{{create_get_nearblocks_fts()}}"
|
2022-07-12 18:55:52 +00:00
|
|
|
|
2022-01-12 19:15:26 +00:00
|
|
|
# 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:
|
2022-12-01 18:02:23 +00:00
|
|
|
+copy_grants: true
|
|
|
|
|
+persist_docs:
|
|
|
|
|
relation: true
|
|
|
|
|
columns: true
|
|
|
|
|
+on_schema_change: "append_new_columns"
|
2023-01-03 21:32:31 +00:00
|
|
|
+post-hook: ["{% if target.name == 'prod_cloud' and this.schema != 'bronze' %} grant select on {{ this }} to share near_mdao {% endif %}"]
|
2022-05-19 12:49:36 +00:00
|
|
|
|
|
|
|
|
tests:
|
2022-08-12 23:17:05 +00:00
|
|
|
near:
|
|
|
|
|
+severity: warn # default to warn for all tests
|
|
|
|
|
core:
|
|
|
|
|
+severity: error # but error if a core view is having issues
|
2022-12-15 01:02:10 +00:00
|
|
|
+store_failures: true # all tests
|
2022-05-25 04:56:10 +00:00
|
|
|
|
|
|
|
|
vars:
|
2022-05-25 05:04:01 +00:00
|
|
|
"dbt_date:time_zone": GMT
|
2023-01-20 02:43:55 +00:00
|
|
|
STREAMLINE_INVOKE_STREAMS: False
|
|
|
|
|
STREAMLINE_USE_DEV_FOR_EXTERNAL_TABLES: False
|
|
|
|
|
UPDATE_UDFS_AND_SPS: False
|