-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for multiple datasources
- Loading branch information
Showing
38 changed files
with
1,520 additions
and
486 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 was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
27 changes: 27 additions & 0 deletions
27
sql/dbt/projects/protocol_uniswap_v2_ethereum_mainnet/models/example/my_first_dbt_model.sql
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,27 @@ | ||
|
||
/* | ||
Welcome to your first dbt model! | ||
Did you know that you can also configure models directly within SQL files? | ||
This will override configurations stated in dbt_project.yml | ||
Try changing "table" to "view" below | ||
*/ | ||
|
||
{{ config(materialized='table') }} | ||
|
||
with source_data as ( | ||
|
||
select 1 as id | ||
union all | ||
select null as id | ||
|
||
) | ||
|
||
select * | ||
from source_data | ||
|
||
/* | ||
Uncomment the line below to remove records with null `id` values | ||
*/ | ||
|
||
-- where id is not null |
6 changes: 6 additions & 0 deletions
6
sql/dbt/projects/protocol_uniswap_v2_ethereum_mainnet/models/example/my_second_dbt_model.sql
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,6 @@ | ||
|
||
-- Use the `ref` function to select from other models | ||
|
||
select * | ||
from {{ ref('my_first_dbt_model') }} | ||
where id = 1 |
21 changes: 21 additions & 0 deletions
21
sql/dbt/projects/protocol_uniswap_v2_ethereum_mainnet/models/example/schema.yml
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,21 @@ | ||
|
||
version: 2 | ||
|
||
models: | ||
- name: my_first_dbt_model | ||
description: "A starter dbt model" | ||
columns: | ||
- name: id | ||
description: "The primary key for this table" | ||
tests: | ||
- unique | ||
- not_null | ||
|
||
- name: my_second_dbt_model | ||
description: "A starter dbt model" | ||
columns: | ||
- name: id | ||
description: "The primary key for this table" | ||
tests: | ||
- unique | ||
- not_null |
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 0 additions & 13 deletions
13
sql/dbt/uniswap_v2/models/analytics/uniswap_v2_ethereum__burn.sql
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
sql/dbt/uniswap_v2/models/analytics/uniswap_v2_ethereum__mint.sql
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
sql/dbt/uniswap_v2/models/analytics/uniswap_v2_ethereum__pool.sql
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
sql/dbt/uniswap_v2/models/analytics/uniswap_v2_ethereum__swaps.sql
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
sql/dbt/uniswap_v2/models/analytics/uniswap_v2_ethereum__sync.sql
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
sql/dbt/uniswap_v2/models/analytics/uniswap_v2_ethereum__token_prices.sql
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
sql/dbt/uniswap_v2/models/analytics/uniswap_v2_ethereum__tvl.sql
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
sql/dbt/uniswap_v2/models/analytics/uniswap_v2_ethereum__volume.sql
This file was deleted.
Oops, something went wrong.
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 @@ | ||
[{"inputs":[{"internalType":"address","name":"_feeToSetter","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token0","type":"address"},{"indexed":true,"internalType":"address","name":"token1","type":"address"},{"indexed":false,"internalType":"address","name":"pair","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"PairCreated","type":"event"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allPairs","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"allPairsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"}],"name":"createPair","outputs":[{"internalType":"address","name":"pair","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"feeTo","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feeToSetter","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"getPair","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_feeTo","type":"address"}],"name":"setFeeTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_feeToSetter","type":"address"}],"name":"setFeeToSetter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] |
File renamed without changes.
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
Oops, something went wrong.