Skip to content

Commit

Permalink
Add staging back in
Browse files Browse the repository at this point in the history
  • Loading branch information
chowbao committed Jan 23, 2024
1 parent f3656e6 commit efb8b07
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion models/docs/sources/history_assets.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[comment]: < History Assets -

{% docs history_assets %}
{% docs history_assets_staging %}
Table reports which assets are used during the batch interval, which can help identify periods of time of large activity for an asset. The table **does not** have a primary key and assets are duplicated in the table as they are used during different periods of time. To get a distinct count of assets on the network, please refer to the history_assets table. Table not widely used.
{% enddocs %}

Expand Down
4 changes: 2 additions & 2 deletions models/sources/src_history_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ sources:
- name: crypto_stellar
database: 'crypto-stellar'
tables:
- name: history_assets
description: '{{ doc("history_assets") }}'
- name: history_assets_staging
description: '{{ doc("history_assets_staging") }}'
columns:
- name: assets_id
description: '{{ doc("asset_type") }}'
Expand Down
2 changes: 1 addition & 1 deletion models/staging/stg_history_assets.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ with
, row_number() over (
partition by asset_id order by batch_run_date asc
) as dedup_oldest_asset
from {{ source('crypto_stellar', 'history_assets')}}
from {{ source('crypto_stellar', 'history_assets_staging')}}
)

/* Deduplicates the new batch assets, guaranteeing they are unique within the batch */
Expand Down

0 comments on commit efb8b07

Please sign in to comment.