Skip to content

Commit 4383776

Browse files
updates
1 parent 9aa80dd commit 4383776

File tree

5 files changed

+34
-38
lines changed

5 files changed

+34
-38
lines changed

.buildkite/scripts/run_models.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ echo `pwd`
1717
cd integration_tests
1818
dbt deps
1919
dbt seed --target "$db" --full-refresh
20-
dbt run --target "$db" --full-refresh --vars '{ad_reporting__facebook_ads_enabled: true, ad_reporting__google_ads_enabled: true, ad_reporting__amazon_ads_enabled: true, ad_reporting__apple_search_ads_enabled: false, ad_reporting__linkedin_ads_enabled: false, ad_reporting__microsoft_ads_enabled: true, ad_reporting__pinterest_ads_enabled: true, ad_reporting__reddit_ads_enabled: false, ad_reporting__snapchat_ads_enabled: false, ad_reporting__tiktok_ads_enabled: true, ad_reporting__twitter_ads_enabled: true}'
21-
dbt test --target "$db" --vars '{ad_reporting__facebook_ads_enabled: true, ad_reporting__google_ads_enabled: true, ad_reporting__amazon_ads_enabled: true, ad_reporting__apple_search_ads_enabled: false, ad_reporting__linkedin_ads_enabled: false, ad_reporting__microsoft_ads_enabled: true, ad_reporting__pinterest_ads_enabled: true, ad_reporting__reddit_ads_enabled: false, ad_reporting__snapchat_ads_enabled: false, ad_reporting__tiktok_ads_enabled: true, ad_reporting__twitter_ads_enabled: true}'
20+
dbt run --target "$db" --full-refresh --vars '{ad_reporting__facebook_ads_enabled: true, ad_reporting__google_ads_enabled: true, ad_reporting__amazon_ads_enabled: false, ad_reporting__apple_search_ads_enabled: false, ad_reporting__linkedin_ads_enabled: false, ad_reporting__microsoft_ads_enabled: false, ad_reporting__pinterest_ads_enabled: false, ad_reporting__reddit_ads_enabled: false, ad_reporting__snapchat_ads_enabled: true, ad_reporting__tiktok_ads_enabled: false, ad_reporting__twitter_ads_enabled: false}'
21+
dbt test --target "$db" --vars '{ad_reporting__facebook_ads_enabled: true, ad_reporting__google_ads_enabled: true, ad_reporting__amazon_ads_enabled: false, ad_reporting__apple_search_ads_enabled: false, ad_reporting__linkedin_ads_enabled: false, ad_reporting__microsoft_ads_enabled: false, ad_reporting__pinterest_ads_enabled: false, ad_reporting__reddit_ads_enabled: false, ad_reporting__snapchat_ads_enabled: true, ad_reporting__tiktok_ads_enabled: false, ad_reporting__twitter_ads_enabled: false}'
2222

2323
dbt run-operation fivetran_utils.drop_schemas_automation --target "$db"

.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,33 @@
44
**This PR will result in the following new package version:**
55
<!--- Please add details around your decision for breaking vs non-breaking version upgrade. If this is a breaking change, were backwards-compatible options explored? -->
66

7-
**Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:**
7+
**Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:**
8+
<!--- Copy/paste the CHANGELOG for this version below. -->
89

910
## PR Checklist
1011
### Basic Validation
1112
Please acknowledge that you have successfully performed the following commands locally:
12-
- [ ] dbt compile
13-
- [ ] dbt run –full-refresh
14-
- [ ] dbt run
15-
- [ ] dbt test
16-
- [ ] dbt run –vars (if applicable)
13+
- [ ] dbt run –full-refresh && dbt test
14+
- [ ] dbt run (if incremental models are present) && dbt test
1715

1816
Before marking this PR as "ready for review" the following have been applied:
19-
- [ ] The appropriate issue has been linked and tagged
20-
- [ ] You are assigned to the corresponding issue and this PR
17+
- [ ] The appropriate issue has been linked, tagged, and properly assigned
18+
- [ ] All necessary documentation and version upgrades have been applied
19+
<!--- Be sure to update the package version in the dbt_project.yml, integration_tests/dbt_project.yml, and README if necessary. -->
20+
- [ ] docs were regenerated (unless this PR does not include any code or yml updates)
2121
- [ ] BuildKite integration tests are passing
22+
- [ ] Detailed validation steps have been provided below
2223

23-
### Detailed Validation
24-
Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":
25-
- [ ] You have validated these changes and assure this PR will address the respective Issue/Feature.
26-
- [ ] You are reasonably confident these changes will not impact any other components of this package or any dependent packages.
27-
- [ ] You have provided details below around the validation steps performed to gain confidence in these changes.
28-
<!--- Provide the steps you took to validate your changes below. -->
29-
30-
### Standard Updates
31-
Please acknowledge that your PR contains the following standard updates:
32-
- Package versioning has been appropriately indexed in the following locations:
33-
- [ ] indexed within dbt_project.yml
34-
- [ ] indexed within integration_tests/dbt_project.yml
35-
- [ ] CHANGELOG has individual entries for each respective change in this PR
36-
<!--- If there is a parallel upstream change, remember to reference the corresponding CHANGELOG as an individual entry. -->
37-
- [ ] README updates have been applied (if applicable)
38-
<!--- Remember to check the following README locations for common updates. →
39-
<!--- Suggested install range (needed for breaking changes) →
40-
<!--- Dependency matrix is appropriately updated (if applicable) →
41-
<!--- New variable documentation (if applicable) -->
42-
- [ ] DECISIONLOG updates have been updated (if applicable)
43-
- [ ] Appropriate yml documentation has been added (if applicable)
44-
45-
### ❗ Special Updates for Ad Reporting ❗
24+
#### ❗ Special Updates for Ad Reporting ❗
4625
To reduce integration testing time, not all models should be enabled in the `run_models.sh` vars. Update the variables after `dbt run` and `dbt test` to set:
4726
- [ ] this PR's package to `true`
4827
- [ ] Google Ads and Facebook Ads to `true` (if not already)
4928
- [ ] All other packages to `false`
5029

51-
### dbt Docs
52-
Please acknowledge that after the above were all completed the below were applied to your branch:
53-
- [ ] docs were regenerated (unless this PR does not include any code or yml updates)
30+
### Detailed Validation
31+
Please share any and all of your validation steps:
32+
<!--- Provide the steps you took to validate your changes below. -->
5433

5534
### If you had to summarize this PR in an emoji, which would it be?
5635
<!--- For a complete list of markdown compatible emojis check our this git repo (https://gist.github.com/rxaviers/7360908) -->
57-
:dancer:
36+
:dancer:

.github/workflows/auto-release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: 'auto release'
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
branches:
7+
- main
8+
9+
jobs:
10+
call-workflow-passing-data:
11+
if: github.event.pull_request.merged
12+
uses: fivetran/dbt_package_automations/.github/workflows/auto-release.yml@main
13+
secrets: inherit

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
- Adjust the severity of the `account_id` test in `ad_reporting__account_report` to `warn`. This is required since Snapchat can hard-delete records from the history tables, but not from the reporting tables. This ensures that accurate statistics are being reported and production pipelines aren't failing. ([PR #20](https://github.com/fivetran/dbt_snapchat_ads/pull/20))
44
- Documents the above decision in the [DECISIONLOG.md](https://github.com/fivetran/dbt_ad_reporting/blob/main/DECISIONLOG.md).
55

6+
## Under the Hood
7+
- Updated the pull request [templates](/.github) ([PR #110](https://github.com/fivetran/dbt_ad_reporting/pull/110)).
8+
- Included auto-releaser GitHub Actions workflow to automate future releases ([PR #110](https://github.com/fivetran/dbt_ad_reporting/pull/110)).
9+
610
## Contributors
711
- [@bthomson22](https://github.com/bthomson22) ([PR #20](https://github.com/fivetran/dbt_snapchat_ads/pull/20))
812

DECISIONLOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Where Account > Campaign > Ad Group > Ad and Search and Keyword reports are crea
1616
### Linkedin Campaign Group and Campaign Mapping
1717
Linkedin's "campaign group" reporting is the equivalent to all other platforms' "campaign" reporting; similarly, Linkedin's "campaign" reporting is equivalent to all other platforms' "ad group" reporting. Therefore, the Ad Reporting campaign model and ad group model each reflect the proper roll up for Linkedin with respects to other platforms.
1818

19-
## Snapchat Ad Account Report Metrics Associated with Deleted Entities
19+
### Snapchat Ad Account Report Metrics Associated with Deleted Entities
2020
Snapchat Ads will hard-delete entities (i.e. ads, ad squads, campaigns, accounts) from their `*_history` tables but retain associated records in their respective `*_hourly_report` tables. This typically does not pose an issue for our `not_null` tests on our Ad Reporting and Snapchat Ads end models, as most entities have their own `<entity>_hourly_report` source tables that come with the appropriate entity-level ID. However, `snapchat_ads__account_report` (and the downstream `ad_reporting__account_report` model) draws from the Snapchat `ad_hourly_report` table, rolls it up to the account level, and joins in the ad `account_id` using history tables. Thus, if any ad report record is associated with a deleted ad, campaign, ad squad, or account, the ad `account_id` will be `null`.
2121

2222
We have opted to keep these records in `snapchat_ads__account_report` and `ad_reporting__account_report`, as it may be valuable to know that non-zero ad metrics are associated with deleted entities. However, we have changed the severity of the `not_null` test on ad `account_id` to be `warn` instead of `error`.

0 commit comments

Comments
 (0)