fivetran / dbt_linkedin

Fivetran's Linkedin Ads dbt package
https://fivetran.github.io/dbt_linkedin/
Apache License 2.0
2 stars 12 forks source link

[Bug] is_latest_version filter omitted from url report #25

Closed fivetran-joemarkiewicz closed 1 year ago

fivetran-joemarkiewicz commented 1 year ago

Is there an existing issue for this?

Describe the issue

Currently the linkedin_ads__url_report could possible be brining in multiple records due to the omission of the is_latest_version filter within the creative cte.

We can see that this filter is properly applied to our other end models and should be applied to the URL report as well. This will ensure we are not duplicating the end model records and only bringing in the latest records.

Relevant error log or model output

Multiple records could end up in the end models.

Expected behavior

The end model only returns the latest versions of the ads.

dbt Project configurations

N/A

Package versions

v1.1.0

What database are you using dbt with?

postgres, redshift, snowflake, bigquery, databricks

dbt Version

v1.3.1

Additional Context

See the dbt Slack convo for more details

Are you willing to open a PR to help address this issue?

epapineau commented 1 year ago

We're working on upgrading our dbt packages and are experiencing a failure on the dbt_utils_unique_combination_of_columns_linkedin_ads__url_report_date_day__creative_id__campaign_id__campaign_group_id__account_id test with v 0.6.0. Is that likely due to this issue?

fivetran-joemarkiewicz commented 1 year ago

Hey @epapineau I would agree that this is likely causing the test failure you are experiencing.

The user who initially raised this issue in dbt Slack mentioned they would be open to contribute to address this issue. If there is no movement by the start of next week we can pick this up and push the update to the next patch release.

epapineau commented 1 year ago

Thanks for the update @fivetran-joemarkiewicz! Super helpful context for us.

fivetran-joemarkiewicz commented 1 year ago

The PR mentioned above has been merged and released in v0.6.1! This should resolve the original issue and will be live on the dbt hub at the top of the hour. As such, I will close out this issue.

Please feel free to re-open the issue if the problem continues to persist after the upgrade is live at the top of the hour.