-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Bug] Source Freshness not running on renamed source tables #4525
Comments
I think this has everything to do with the A couple of thoughts:
reproductionIf I run this in a separate unrelated project: version: 2
sources:
- name: salesforce
description: 'my cool description'
loader: stitch
loaded_at_field: _sdc_batched_at
database: raw
freshness:
warn_after: {count: 4, period: hour}
error_after: {count: 8, period: hour}
tables:
- name: account
- name: forecasts
identifier: forecast__c In the logs I see:
However, as soon as I install the Fivetran package (running # packages.yml
packages:
- package: fivetran/fivetran_utils
version: 0.3.0 Then I see:
|
Hey @jtcohen6 and @ericalouie I have been able to look into this on my end and see where the issue resides within our That being said, I agree that I would prefer the Let me know if you have any immediate thoughts on how this can be bet tackled. |
Yeah, there's no great way to do this. I suppose you could check whether
Agree, agree, agree. We need to actually disable these sources (which also disables their freshness checks), rather than trying to "pass over" them at runtime. The best approach for this, IMO, is to give you the ability to disable sources by means of variables. I'd really like to do this via #3662 (which I just prioritized for v1.1), so that you can replace this logic with: sources:
- name: hubspot
tables:
...
- name: contact
description: Each record represents a contact in Hubspot.
config:
enabled: "{{ var('hubspot_marketing_enabled', true) }} and {{ var('hubspot_contact_enabled', true) }}" |
Thanks so much @jtcohen6! 🙌 Switching away from the current process to the source override logic you have above will be perfect. I have made a note for myself to check back in once v1.1 is live to make these respective updates to our packages. I am happy to test this once an RC available in the future, or help in any other way I can. |
@fivetran-joemarkiewicz FYI The capability mentioned above is included in v1.1 (currently available as a release candidate): sources:
- name: specific_source
tables:
- name: specific_source_table
config:
enabled: False In the case of your packages, like: sources:
- name: hubspot
tables:
...
- name: contact
description: Each record represents a contact in Hubspot.
config:
enabled: "{{ var('hubspot_marketing_enabled', true) }} and {{ var('hubspot_contact_enabled', true) }}" That should get us away from a need for a custom |
Thanks so much for this update @jtcohen6 🙌 This will be a great addition! I will test this out on the RC and let you know if I have any issues or comments. Looking forward to moving away from the source freshness override! |
After reviewing this issue, there's one thing we didn't get to the bottom of: Why did the package definition of dispatch:
- macro_namespace: collect_freshness
search_order: ['fivetran_utils', 'dbt'] I'm going to open that in a new issue, since the other parts of this issue have since been resolved. |
Is there an existing issue for this?
Current Behavior
resource: our slack convo (dbt Labs)
Looks like any source table that has been renamed (i.e. has the identifier argument) doesn’t pull in the correct
loaded_at
timestamp. Rather, it automatically defaults to thecurrent_timestamp()
However, when I switch the lead source to reference
lead__c
rather thanlead
, it looks like dbt will correctly pull the_sdc_batched_at
field.Example of source file:
Expected Behavior
If the
identifier
argument exists, then dbt should choose the identifier argument, not the tablename
. And then it can pull the correctloaded_at
field.Steps To Reproduce
source.yml
filedbt source freshness
Relevant log output
Environment
What database are you using dbt with?
snowflake
Additional Context
No response
The text was updated successfully, but these errors were encountered: