-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,305 changed files
with
3,997 additions
and
8,760 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: DBT DEX sector run | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
paths: | ||
- dex/** | ||
- .github/workflows/dex.yml | ||
- .github/workflows/dbt_run.yml | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
dbt-run: | ||
uses: ./.github/workflows/dbt_run.yml | ||
with: | ||
project: 'dex' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## DEX subproject | ||
|
||
This is a DBT subproject for the main lineages of the DEX sector. Included in this subproject, but not limited to over time: | ||
- `dex.trades` | ||
- `dex_aggreagtor.trades` | ||
- `dex.prices` | ||
- `dex.sandwiches` | ||
- `dex.sandwiched` | ||
- ...and more! | ||
|
||
This subproject will be dedicated to building the above spells (and others in the future related to DEX) on an hourly cadence in production. All other spells not included within this subproject will treat these spells as sources. For example, labels spells which read from `dex.trades` will now treat the spell as a source, rather than reference within dbt. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#Welcome to your Spellbook! | ||
|
||
name: "dex" | ||
version: "1.0.0" | ||
config-version: 2 | ||
|
||
quoting: | ||
database: false | ||
schema: false | ||
identifier: false | ||
|
||
# This setting configures which "profile" dbt uses for this project. | ||
profile: "spellbook-local" | ||
|
||
vars: | ||
DBT_ENV_CUSTOM_ENV_S3_BUCKET: "{{ env_var('DBT_ENV_CUSTOM_ENV_S3_BUCKET', 'local') }}" | ||
DBT_ENV_INCREMENTAL_TIME: "{{ env_var('DBT_ENV_INCREMENTAL_TIME', '1') }}" | ||
DBT_ENV_INCREMENTAL_TIME_UNIT: "{{ env_var('DBT_ENV_INCREMENTAL_TIME_UNIT', 'day') }}" | ||
|
||
# These configurations specify where dbt should look for different types of files. | ||
# You don't need to change these! | ||
model-paths: ["models", "../sources"] | ||
analysis-paths: ["analyses"] | ||
test-paths: ["tests"] | ||
seed-paths: ["seeds"] | ||
macro-paths: ["macros", "../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_packages" | ||
|
||
# Configuring tests | ||
# Full documentation: https://docs.getdbt.com/reference/test-configs | ||
tests: | ||
dex: | ||
+store_failures: true # store failures for all tests | ||
|
||
# Configuring seeds | ||
# Full documentation: https://docs.getdbt.com/reference/seed-configs | ||
# For configuring individual seeds (e.g. overriding column types) we recommend a yml file nested in the same folder as the seed | ||
seeds: | ||
dex: | ||
+schema: test_data | ||
|
||
# defining search order of macro invokation | ||
dispatch: | ||
- macro_namespace: dbt_utils | ||
search_order: ['trino_utils', 'dbt_utils'] | ||
|
||
# Configuring models | ||
# Full documentation: https://docs.getdbt.com/docs/configuring-models | ||
models: | ||
dex: | ||
+post-hook: | ||
- sql: "{{ set_trino_session_property(is_materialized(model), 'writer_scaling_min_data_processed', model.config.get('writer_min_size', '500MB')) }}" | ||
transaction: true | ||
- sql: "{{ set_trino_session_property(is_materialized(model), 'task_scale_writers_enabled', false) }}" | ||
transaction: true | ||
- sql: "{{ optimize_spell(this, model.config.materialized) }}" | ||
transaction: true | ||
- sql: "{{ mark_as_spell(this, model.config.materialized) }}" | ||
transaction: true | ||
+materialized: view | ||
+schema: no_schema # this should be overriden in model specific configs | ||
+view_security: invoker |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.