Closed ivanblagdan closed 2 years ago
Attaching the debug log of the run: dbt.log
@ivanblagdan thanks so much for opening this issue!
I did some initial scoping on this bug and believe to have found the solution. I have a feeling Fivetran is syncing your HubSpot timestamp fields into your warehouse as timestamptz
. This in fact causes a downstream error when leveraging date functions as Redshift does not allow for timestamptz
to be used in date functions.
Thankfully, we can leverage {{ dbt_utils.type_timestamp() }}
in order to safely cast these timestamps and ensure they are able to be used within date functions! I have just made changes to the dbt_linkedin_source that should fix this error. Would you be able to try the following new branch of the dbt_ad_reporting package in your packages.yml
and let me know if this error still persists?
##packages.yml
packages:
- git: https://github.com/fivetran/dbt_ad_reporting.git
revision: bugfix/timestamp-casting
warn-unpinned: false
@fivetran-joemarkiewicz did the trick. I got the whole ad-reporting model built and working. Let me know if you want me to provide any more info.
That's great to hear!! I will move this PR mentioned above into review.
This PR most likely will not be able to be reviewed until late next week (when our next sprint starts). However, in the meantime, I will not make any changes to the existing branch and you are welcome to leverage the branch version. Feel free to follow this issue or the PR for when it is official merged and released.
Thanks again for raising this issue and your help in identifying the solution đŸ˜„
Is there an existing issue for this?
Describe the issue
When running the ad reporting package, I'm running into an error with the Linkedin dep. Here's what I'm seeing.
Relevant error log or model output
No response
Expected behavior
Ideally, the Linkedin models and the ad reporting models would successfully complete their run.
dbt Project configurations
models: pinterest: enabled: false
+schema: pinterest
pinterest_source: enabled: false
+schema: pinterest_source
snapchat_ads: enabled: false
+schema: snapchat_ads
snapchat_ads_source: enabled: false
+schema: snapchat_ads_source
tiktok_ads: enabled: false
+schema: tiktok_ads
tiktok_ads_source: enabled: false
+schema: tiktok_ads_source
facebook_ads: enabled: false
+schema: facebook_ads
facebook_ads_source: enabled: false
+schema: facebook_ads_source
facebook_ads_creative_history: enabled: false
+schema: facebook_ads
twitter_ads: enabled: false
+schema: twitter_ads
twitter_ads_source: enabled: false
+schema: twitter_ads_source
microsoft_ads: enabled: false
+schema: microsoft_ads
microsoft_ads_source: enabled: false
+schema: microsoft_ads_source
linkedin:
enabled: false
+schema: linkedin
linkedin_source:
enabled: false
+schema: linkedin_source
google_ads:
enabled: false
+schema: google_ads
google_ads_source:
enabled: false
+schema: google_ads_source
vars: api_source: google_ads ad_reportingpinterest_enabled: False ad_reportingmicrosoft_ads_enabled: False ad_reportinglinkedin_ads_enabled: True ad_reporting__google_ads_enabled: True ad_reportingtwitter_ads_enabled: False ad_reportingfacebook_ads_enabled: False ad_reporting__snapchat_ads_enabled: False ad_reportingtiktok_ads_enabled: False microsoft_ads_schema: bing microsoft_ads_database: fivetran linkedin_schema: linkedin_ads linkedin_database: fivetran
pinterest_schema: pinterest pinterest_database: fivetran twitter_ads_schema: twitter twitter_ads_database: fivetran
facebook_ads_schema: facebook facebook_ads_database: fivetran google_ads_schema: adwords google_ads_database: fivetran snapchat_schema: snapchat snapchat_database: fivetran tiktok_ads_schema: tiktok tiktok_ads_database: fivetran
Package versions
packages:
What database are you using dbt with?
redshift
dbt Version
$ dbt --version installed version: 1.0.4 latest version: 1.0.5
Your version of dbt is out of date! You can find instructions for upgrading here: https://docs.getdbt.com/docs/installation
Plugins:
redshift: 1.0.0 - Update available! Your version of dbt-redshift is out of date! You can find instructions for upgrading here: https://docs.getdbt.com/dbt-cli/install/overview
postgres: 1.0.4 - Up to date!
$ brew upgrade dbt-redshift Warning: dbt-labs/dbt/dbt-redshift 1.0.0_3 already installed
Additional Context
No response
Are you willing to open a PR to help address this issue?