-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* new prices models and docs * references * new names * addr desc
- Loading branch information
1 parent
e224bf4
commit c4ef615
Showing
59 changed files
with
954 additions
and
130 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 26 additions & 0 deletions
26
models/bronze/prices/bronze__complete_native_asset_metadata.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,26 @@ | ||
{{ config ( | ||
materialized = 'view' | ||
) }} | ||
|
||
SELECT | ||
asset_id, | ||
symbol, | ||
NAME, | ||
decimals, | ||
blockchain, | ||
is_deprecated, | ||
provider, | ||
source, | ||
_inserted_timestamp, | ||
inserted_timestamp, | ||
modified_timestamp, | ||
complete_native_asset_metadata_id, | ||
_invocation_id | ||
FROM | ||
{{ source( | ||
'silver_crosschain', | ||
'complete_native_asset_metadata' | ||
) }} | ||
WHERE | ||
blockchain = 'ethereum' | ||
AND symbol = 'ETH' |
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,29 @@ | ||
{{ config ( | ||
materialized = 'view' | ||
) }} | ||
|
||
SELECT | ||
HOUR, | ||
asset_id, | ||
symbol, | ||
NAME, | ||
decimals, | ||
price, | ||
blockchain, | ||
is_imputed, | ||
is_deprecated, | ||
provider, | ||
source, | ||
_inserted_timestamp, | ||
inserted_timestamp, | ||
modified_timestamp, | ||
complete_native_prices_id, | ||
_invocation_id | ||
FROM | ||
{{ source( | ||
'silver_crosschain', | ||
'complete_native_prices' | ||
) }} | ||
WHERE | ||
blockchain = 'ethereum' | ||
AND symbol = 'ETH' |
26 changes: 26 additions & 0 deletions
26
models/bronze/prices/bronze__complete_provider_asset_metadata.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,26 @@ | ||
{{ config ( | ||
materialized = 'view' | ||
) }} | ||
|
||
SELECT | ||
asset_id, | ||
token_address, | ||
NAME, | ||
symbol, | ||
platform, | ||
platform_id, | ||
provider, | ||
source, | ||
_inserted_timestamp, | ||
inserted_timestamp, | ||
modified_timestamp, | ||
complete_provider_asset_metadata_id, | ||
_invocation_id | ||
FROM | ||
{{ source( | ||
'silver_crosschain', | ||
'complete_provider_asset_metadata' | ||
) }} | ||
WHERE | ||
platform = 'Base' | ||
-- platforms specific to Base |
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,24 @@ | ||
{{ config ( | ||
materialized = 'view' | ||
) }} | ||
|
||
SELECT | ||
asset_id, | ||
recorded_hour, | ||
OPEN, | ||
high, | ||
low, | ||
CLOSE, | ||
provider, | ||
source, | ||
_inserted_timestamp, | ||
inserted_timestamp, | ||
modified_timestamp, | ||
complete_provider_prices_id, | ||
_invocation_id | ||
FROM | ||
{{ source( | ||
'silver_crosschain', | ||
'complete_provider_prices' | ||
) }} | ||
-- prices for all ids |
28 changes: 28 additions & 0 deletions
28
models/bronze/prices/bronze__complete_token_asset_metadata.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,28 @@ | ||
{{ config ( | ||
materialized = 'view' | ||
) }} | ||
|
||
SELECT | ||
token_address, | ||
asset_id, | ||
symbol, | ||
NAME, | ||
decimals, | ||
blockchain, | ||
blockchain_name, | ||
blockchain_id, | ||
is_deprecated, | ||
provider, | ||
source, | ||
_inserted_timestamp, | ||
inserted_timestamp, | ||
modified_timestamp, | ||
complete_token_asset_metadata_id, | ||
_invocation_id | ||
FROM | ||
{{ source( | ||
'silver_crosschain', | ||
'complete_token_asset_metadata' | ||
) }} | ||
WHERE | ||
blockchain = 'base' |
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,31 @@ | ||
{{ config ( | ||
materialized = 'view' | ||
) }} | ||
|
||
SELECT | ||
HOUR, | ||
token_address, | ||
asset_id, | ||
symbol, | ||
NAME, | ||
decimals, | ||
price, | ||
blockchain, | ||
blockchain_name, | ||
blockchain_id, | ||
is_imputed, | ||
is_deprecated, | ||
provider, | ||
source, | ||
_inserted_timestamp, | ||
inserted_timestamp, | ||
modified_timestamp, | ||
complete_token_prices_id, | ||
_invocation_id | ||
FROM | ||
{{ source( | ||
'silver_crosschain', | ||
'complete_token_prices' | ||
) }} | ||
WHERE | ||
blockchain = 'base' |
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,143 @@ | ||
{% docs prices_dim_asset_metadata_table_doc %} | ||
|
||
A comprehensive dimensional table holding asset metadata and other relevant details pertaining to each id, from multiple providers. This data set includes raw, non-transformed data coming directly from the provider APIs and rows are not intended to be unique. As a result, there may be data quality issues persisting in the APIs that flow through to this dimensional model. If you are interested in using a curated data set instead, please utilize ez_asset_metadata. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_ez_asset_metadata_table_doc %} | ||
|
||
A convenience table holding prioritized asset metadata and other relevant details pertaining to each token_address and native asset. This data set is highly curated and contains metadata for one unique asset per blockchain. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_fact_prices_ohlc_hourly_table_doc %} | ||
|
||
A comprehensive fact table holding id and provider specific open, high, low, close hourly prices, from multiple providers. This data set includes raw, non-transformed data coming directly from the provider APIs and rows are not intended to be unique. As a result, there may be data quality issues persisting in the APIs that flow through to this fact based model. If you are interested in using a curated data set instead, please utilize ez_prices_hourly. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_ez_prices_hourly_table_doc %} | ||
|
||
A convenience table for determining token prices by address and blockchain, and native asset prices by symbol and blockchain. This data set is highly curated and contains metadata for one price per hour per unique asset and blockchain. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_provider %} | ||
|
||
The provider or source of the data. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_asset_id %} | ||
|
||
The unique identifier representing the asset. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_name %} | ||
|
||
The name of asset. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_symbol %} | ||
|
||
The symbol of asset. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_token_address %} | ||
|
||
The specific address representing the asset on a specific platform. This will be NULL if referring to a native asset. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_token_address_evm %} | ||
|
||
The specific address representing the asset on a specific platform. This will be NULL if referring to a native asset. The case (upper / lower) may or may not be specified within the `dim_asset_metadata` table, as this column is raw and not transformed, coming directly from the provider APIs. However, in the `ez_` views, it will be lowercase by default for all EVMs. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_blockchain %} | ||
|
||
The Blockchain, Network, or Platform for this asset. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_blockchain_id %} | ||
|
||
The unique identifier of the Blockchain, Network, or Platform for this asset. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_decimals %} | ||
|
||
The number of decimals for the asset. May be NULL. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_is_native %} | ||
|
||
A flag indicating assets native to the respective blockchain. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_is_deprecated %} | ||
|
||
A flag indicating if the asset is deprecated or no longer supported by the provider. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_id_deprecation %} | ||
|
||
Deprecating soon! Please use the `asset_id` column instead. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_decimals_deprecation %} | ||
|
||
Deprecating soon! Please use the decimals column in `ez_asset_metadata` or join in `dim_contracts` instead. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_hour %} | ||
|
||
Hour that the price was recorded at. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_price %} | ||
|
||
Closing price of the recorded hour in USD. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_is_imputed %} | ||
|
||
A flag indicating if the price was imputed, or derived, from the last arriving record. This is generally used for tokens with low-liquidity or inconsistent reporting. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_open %} | ||
|
||
Opening price of the recorded hour in USD. | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_high %} | ||
|
||
Highest price of the recorded hour in USD | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_low %} | ||
|
||
Lowest price of the recorded hour in USD | ||
|
||
{% enddocs %} | ||
|
||
{% docs prices_close %} | ||
|
||
Closing price of the recorded hour in USD | ||
|
||
{% enddocs %} |
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.