Skip to content
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

Ad reporting v2 updates #21

Merged
merged 13 commits into from
Sep 2, 2022
Merged

Ad reporting v2 updates #21

merged 13 commits into from
Sep 2, 2022

Conversation

fivetran-jamie
Copy link
Contributor

@fivetran-jamie fivetran-jamie commented Aug 2, 2022

Pull Request
Are you a current Fivetran customer?

fivetran made PR

What change(s) does this PR introduce?

  • refactors campaign, campaign group, and ad report models
  • adds creative + url report models (replacing ad_adapter)
  • updates README
  • updates CHANGELOG
  • changes build schemas
  • generates docs (need to enable Github Pages after merging) 👀
  • updates passthrough column method (and passes them to ALL end models)

Did you update the CHANGELOG?

  • Yes

Does this PR introduce a breaking change?

  • Yes (please provide breaking change details below.)
  • No (please provide an explanation as to how the change is non-breaking below.)

Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)

  • Yes

Is this PR in response to a previously created Bug or Feature Request

How did you test the PR changes?

  • CircleCi
  • Local (please provide additional testing details below)

Select which warehouse(s) were used to test the PR

  • BigQuery
  • Redshift
  • Snowflake
  • Postgres
  • Databricks
  • Other (provide details below)

Provide an emoji that best describes your current mood

🎸

Feedback

We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your feedback on our existing dbt packages or what you'd like to see next.

Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fivetran-jamie thanks for making this updates. The PR looks mostly good, I just have a few suggestions below. Additionally, there are a number of suggestions I have that are dependent on some source package updates. We should settle on those before tackling these updates. Let me know if you have any questions.

  • I noticed the partial_parse.mgpack and graph.gpickle files are included. Can we remove them if they are not needed.
  • Address any suggestions in the comments below

Comment on lines 65 to 66
- date_day
- campaign_id
Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz Aug 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be appropriate to also test on account_id and campaign_group_id as well?

Comment on lines +214 to +215
- date_day
- campaign_group_id
Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz Aug 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also test on account_id?

Comment on lines +279 to +280
- date_day
- creative_id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also test on campaign_group_id, campaign_id, and account_id?

Comment on lines +387 to +388
- date_day
- creative_id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also test on campaign_group_id, campaign_id, and account_id?


select *
from {{ var('account_history') }}
where valid_to is null -- get latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we update the source package to leverage the is_most_recent logic instead, we will want to update this to reflect that change.


select *
from {{ var('campaign_group_history') }}
where valid_to is null -- get latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as other is_most_recent comments.


select *
from {{ var('account_history') }}
where valid_to is null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as other is_most_recent comments.

README.md Outdated
Comment on lines 26 to 30
| [linkedin_ads__account_report](https://github.com/fivetran/dbt_linkedin/blob/main/models/linkedin_ads__account_report.sql) | Each record represents the daily ad performance of each account. |
| [linkedin_ads__campaign_report](https://github.com/fivetran/dbt_linkedin/blob/main/models/linkedin_ads__campaign_report.sql) | Each record represents the daily ad performance of each campaign. Linkedin campaigns map onto ad groups in other ad platforms. |
| [linkedin_ads__campaign_group_report](https://github.com/fivetran/dbt_linkedin/blob/main/models/linkedin_ads__campaign_group_report.sql) | Each record represents the daily ad performance of each campaign group. Linkedin |
| [linkedin_ads__creative_report](https://github.com/fivetran/dbt_linkedin/blob/main/models/linkedin_ads__creative_report.sql) | Each record represents the daily ad performance of each creative. |
| [linkedin_ads__url_report](https://github.com/fivetran/dbt_linkedin/blob/main/models/linkedin_ads__url_report.sql) | Each record represents the daily ad performance of each url. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we update these links to use the dbt docs links instead? It may be easiest to wait to update these until we have merged to main and the docs are officially hosted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will just wanna double check that the links are good after merging and enabling github pages

README.md Outdated
Comment on lines 83 to 89
linkedin_ads__passthrough_metrics:
- name: "new_custom_field"
alias: "custom_field"
- name: "unique_int_field"
alias: "field_id"
transform_sql: "cast(field_id as int)"
- name: "that_field"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the outcome of the question posed in the source package, we may or may not need to update this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

sum(report.impressions) as impressions,
sum(report.cost) as cost

{{ fivetran_utils.persist_pass_through_columns('linkedin_ads__passthrough_metrics', transform='sum') }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment from the source regarding our decision to possibly split this out into two variables.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change suggested here would need to be applied to the other models if we decide to update.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split the variables

@fivetran-joemarkiewicz
Copy link
Contributor

@fivetran-jamie can you also rename this PR. Just so it doesn't seem deceiving upon first glance.

@fivetran-jamie fivetran-jamie changed the title wrong branch Ad reporting v2 updates Aug 8, 2022
@fivetran-sheringuyen fivetran-sheringuyen merged commit 0adbd83 into main Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants