Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbt Elementary and tests configuration #11

Merged
merged 7 commits into from
Jan 18, 2024
48 changes: 30 additions & 18 deletions models/docs/marts/trade_agg.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ Date from which all metrics are aggregated. In the Trade Aggregations table, the

{% enddocs %}

{% docs selling_asset_type %}
{% docs asset_a %}

Hashed id for the selling_asset.

{% enddocs %}

{% docs asset_a_type %}

The identifier for type of asset code used for the sold asset within the trade
Notes:
Expand All @@ -21,7 +27,7 @@ XLM is the native asset to the network. XLM has no asset code or issuer represen

{% enddocs %}

{% docs selling_asset_code %}
{% docs asset_a_code %}

The 4 or 12 character code of the sold asset within a trade
Notes:
Expand All @@ -30,13 +36,19 @@ Asset codes have no guarantees of uniqueness. The combination of asset code, iss

{% enddocs %}

{% docs selling_asset_issuer %}
{% docs asset_a_issuer %}

The account address of the original asset issuer for the sold asset within a trade

{% enddocs %}

{% docs buying_asset_type %}
{% docs asset_b %}

Hashed id for the buying_asset.

{% enddocs %}

{% docs asset_b_type %}

The identifier for type of asset code used for the bought asset within the trade
Notes:
Expand All @@ -45,7 +57,7 @@ XLM is the native asset to the network. XLM has no asset code or issuer represen

{% enddocs %}

{% docs buying_asset_code %}
{% docs asset_b_code %}

The 4 or 12 character code of the bought asset within a trade
Notes:
Expand All @@ -54,7 +66,7 @@ Asset codes have no guarantees of uniqueness. The combination of asset code, iss

{% enddocs %}

{% docs buying_asset_issuer %}
{% docs asset_b_issuer %}

The account address of the original asset issuer for the bought asset within a trade

Expand All @@ -66,19 +78,19 @@ The count of trades executed against the network in a day.

{% enddocs %}

{% docs selling_volume_daily %}
{% docs asset_a_volume_daily %}

The total raw amount of the asset being sold in all trades within that day.

{% enddocs %}

{% docs buying_volume_daily %}
{% docs asset_b_volume_daily %}

The total raw amount of the asset being bought in all trades within that day.

{% enddocs %}

{% docs avg_daily %}
{% docs avg_price_daily %}

The total amount of the asset being bought in all trades divided by the total amount of the asset being sold in all trades, within that day.

Expand Down Expand Up @@ -126,19 +138,19 @@ The count of trades executed against the network during the past 7 days.

{% enddocs %}

{% docs selling_volume_weekly %}
{% docs asset_a_volume_weekly %}

The total amount of the asset being sold in all trades during the past 7 days.

{% enddocs %}

{% docs buying_volume_weekly %}
{% docs asset_b_volume_weekly %}

The total amount of the asset being bought in all trades during the past 7 days.

{% enddocs %}

{% docs avg_weekly %}
{% docs avg_price_weekly %}

The total amount of the asset being bought in all trades divided by the total amount of the asset being sold in all trades, during the past 7 days.

Expand Down Expand Up @@ -186,19 +198,19 @@ The count of trades executed against the network during the past 30 days.

{% enddocs %}

{% docs selling_volume_monthly %}
{% docs asset_a_volume_monthly %}

The total amount of the asset being sold in all trades during the past 30 days.

{% enddocs %}

{% docs buying_volume_monthly %}
{% docs asset_b_volume_monthly %}

The total amount of the asset being bought in all trades during the past 30 days.

{% enddocs %}

{% docs avg_monthly %}
{% docs avg_price_monthly %}

The total amount of the asset being bought in all trades divided by the total amount of the asset being sold in all trades, during the past 30 days.

Expand Down Expand Up @@ -246,19 +258,19 @@ The count of trades executed against the network during the past 365 days.

{% enddocs %}

{% docs selling_volume_yearly %}
{% docs asset_a_volume_yearly %}

The total amount of the asset being sold in all trades during the past 365 days.

{% enddocs %}

{% docs buying_volume_yearly %}
{% docs asset_b_volume_yearly %}

The total amount of the asset being bought in all trades during the past 365 days.

{% enddocs %}

{% docs avg_yearly%}
{% docs avg_price_yearly%}

The total amount of the asset being bought in all trades divided by the total amount of the asset being sold in all trades, during the past 365 days.

Expand Down
26 changes: 4 additions & 22 deletions models/docs/sources/liquidity_pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,9 @@ The total number of pool shares is calculated by a constant product formula and
Shares are not transferable; the only way to increase the number of pool shares held is to deposit into a liquidity pool. Conversely, decreasing pools shares can only be accomplished through a withdraw operation. Shares cannot be sent in payments or sold using offers.
{% enddocs %}

{% docs asset_a_type %}
The identifier for type of asset code, can be a alphanumeric with 4 characters, 12 characters or the native asset to the network, XLM.
{% docs asset_a_id %}
The Farm Hash encoding of the Asset Code + Asset Issuer and Asset Type for one of the asset pairs in a liquidity pool.

- Required Field
{% enddocs %}

{% docs asset_a_code %}
The 4 or 12 character code representation of the asset of one of the two asset pairs in a liquidity pool
{% enddocs %}

{% docs asset_a_issuer%}
The account address of the original asset issuer that created one of the two asset pairs in the liquidity pool
{% enddocs %}

{% docs asset_a_amount %}
Expand All @@ -82,18 +73,9 @@ The raw number of tokens locked in the pool for one of the two asset pairs in th
- Required Field
{% enddocs %}

{% docs asset_b_type %}
The identifier for type of asset code, can be a alphanumeric with 4 characters, 12 characters or the native asset to the network, XLM.

- Required Field
{% enddocs %}

{% docs asset_b_code %}
The 4 or 12 character code representation of the asset of one of the two asset pairs in a liquidity pool
{% enddocs %}
{% docs asset_b_id %}
The Farm Hash encoding of the Asset Code + Asset Issuer and Asset Type for the corresponding asset in the liquidity pool.

{% docs asset_b_issuer %}
The account address of the original asset issuer that created one of the two asset pairs in the liquidity pool
{% enddocs %}

{% docs asset_b_amount %}
Expand Down
5 changes: 5 additions & 0 deletions models/docs/universal.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ The identifier for type of asset code, can be an alphanumeric with 4 characters,
XLM is the native asset to the network. XLM has no asset code or issuer representation and will instead be displayed with an asset type of 'native'
{% enddocs %}

{% docs asset_id %}
The Farm Hash encoding of Asset Code + Asset Issuer + Asset Type. This field is optimized for cross table joins since integer joins are less expensive than the original asset id components.

{% enddocs %}

{% docs asset_code %}
The 4 or 12 character code representation of the asset on the network.

Expand Down
Loading