-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add tags to models #16
Conversation
chowbao
commented
Jan 24, 2024
•
edited
Loading
edited
- Add tags to models for airflow scheduling
- Move current tables into dbt public
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious, what would be the impact if we didn't tag any of the stg_
source views?
I noticed that each staging view is tagged with current_state
or enriched_history_operations
, but those sources are used by more than just those final models, so curious how you determined what the tag should be. And whether there is merit in keep the tags for those models.
Oh they never run. Everything was working because test_sdf_raw already had all the views already I think this means that the staging tables need tags for anything that uses them if we keep the dbt-public staging ephemeral |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh they never run. Everything was working because test_sdf_raw already had all the views already
Interesting, I thought the views were supposed to be ephemeral, and should have been built as part of the CTE. So if you run something like trade_agg
with an untagged stg_history_trades
, it doesn't rebuild the source SQL?
If we have to rebuild the views, what are your thoughts on just tagging them as enriched_history_operations
and running them in the half hourly DAG? I think adding new tags any time we build out a new pipeline is gonna get old
order by s.last_modified_ledger desc, s.ledger_entry_change desc | ||
) as row_nr | ||
from {{ ref('stg_account_signers') }} as s | ||
join {{ ref('stg_history_ledgers') }} as l |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: I think we can remove the join against history_ledgers
on the current state tables. Since the state tables now all have closed_at
. We will need to validate that though and confirm that the closed_at
field is backfilled appropriately.
Yeah that's what I found when I tried it locally.
Yeah that works. The problem then becomes where do you want to put the stellar-dbt-public views? Hard code prod to write to sdf_raw in the internal project? |
Sounds like we have two options:
Do you have a preference on which we move forward with? If we opt for option #2, I would prefer the views be materialized in a new, private |
Hmm we should probably do option 2. You're right that option 1 would get old really fast. Plus option 2 probably makes more sense for community devs because dbt-public does make views if run by itself instead of a package in dbt private |