Skip to content

Commit

Permalink
Merge pull request #19 from fivetran/release/v0.5.2
Browse files Browse the repository at this point in the history
Release/v0.5.2
  • Loading branch information
fivetran-avinash authored Dec 19, 2023
2 parents 61f851a + 813beb9 commit 5d8668e
Show file tree
Hide file tree
Showing 15 changed files with 80 additions and 66 deletions.
45 changes: 12 additions & 33 deletions .github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,27 @@
**This PR will result in the following new package version:**
<!--- Please add details around your decision for breaking vs non-breaking version upgrade. If this is a breaking change, were backwards-compatible options explored? -->

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

## PR Checklist
### Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
- [ ] dbt compile
- [ ] dbt run –full-refresh
- [ ] dbt run
- [ ] dbt test
- [ ] dbt run –vars (if applicable)
- [ ] dbt run –full-refresh && dbt test
- [ ] dbt run (if incremental models are present)

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

### Detailed Validation
Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":
- [ ] You have validated these changes and assure this PR will address the respective Issue/Feature.
- [ ] You are reasonably confident these changes will not impact any other components of this package or any dependent packages.
- [ ] You have provided details below around the validation steps performed to gain confidence in these changes.
Please share any and all of your validation steps:
<!--- Provide the steps you took to validate your changes below. -->

### Standard Updates
Please acknowledge that your PR contains the following standard updates:
- Package versioning has been appropriately indexed in the following locations:
- [ ] indexed within dbt_project.yml
- [ ] indexed within integration_tests/dbt_project.yml
- [ ] CHANGELOG has individual entries for each respective change in this PR
<!--- If there is a parallel upstream change, remember to reference the corresponding CHANGELOG as an individual entry. -->
- [ ] README updates have been applied (if applicable)
<!--- Remember to check the following README locations for common updates. →
<!--- Suggested install range (needed for breaking changes) →
<!--- Dependency matrix is appropriately updated (if applicable) →
<!--- New variable documentation (if applicable) -->
- [ ] DECISIONLOG updates have been updated (if applicable)
- [ ] Appropriate yml documentation has been added (if applicable)

### dbt Docs
Please acknowledge that after the above were all completed the below were applied to your branch:
- [ ] docs were regenerated (unless this PR does not include any code or yml updates)

### If you had to summarize this PR in an emoji, which would it be?
<!--- For a complete list of markdown compatible emojis check our this git repo (https://gist.github.com/rxaviers/7360908) -->
:dancer:
💃
13 changes: 13 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'auto release'
on:
pull_request:
types:
- closed
branches:
- main

jobs:
call-workflow-passing-data:
if: github.event.pull_request.merged
uses: fivetran/dbt_package_automations/.github/workflows/auto-release.yml@main
secrets: inherit
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ target/
dbt_modules/
logs/
.DS_Store
dbt_packages/
dbt_packages/
package-lock.yml
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# dbt_mailchimp_source v0.5.2
[PR #19](https://github.com/fivetran/dbt_mailchimp_source/pull/19) includes the following updates:

## 🐛 Bug Fixes 🔨
- Cast `activity_timestamp` in `stg_mailchimp__campaign_activities` and `send_timestamp` in `stg_mailchimp__campaigns` to `dbt.type_timestamp()`. This ensures the `dbt.datediff()` function in the `mailchimp__campaign_activities` model in the `dbt_mailchimp` package properly runs in Redshift.
- Corrected source freshness variables to properly reference `mailchimp_using_automations`.

## 🧪 Test Updates 🧪
- Updated the source freshness test enablement/disablement to leverage the dbt-core `config: enabled:` architecture.
- Added source freshness tests for models utilizing the `mailchimp_using_segments` variable.

## 🚘 Under the Hood 🚘
- Updated the pull request [templates](/.github).
- Included auto-releaser GitHub Actions workflow to automate future releases.

# dbt_mailchimp_source v0.5.1
[PR #17](https://github.com/fivetran/dbt_mailchimp_source/pull/17) includes the following updates:
## 🎉 Feature Update
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Your Mailchimp connector may not sync every table that this package expects. If

```yml
vars:
mailchip_using_automations: false #disable if you do not have the automation_email, automation_email, or automation_recipient_activity tables
mailchimp_using_automations: false #disable if you do not have the automation_email, automation_email, or automation_recipient_activity tables
mailchimp_using_segments: false #disable if you do not have the segment or segment_member table
```

Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'mailchimp_source'
version: '0.5.1'
version: '0.5.2'
config-version: 2
models:
mailchimp_source:
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions docs/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/manifest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/run_results.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion integration_tests/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
target/
dbt_modules/
logs/
.DS_Store
env/
.DS_Store
package-lock.yml
6 changes: 3 additions & 3 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'mailchimp_source_integration_tests'
version: '0.5.1'
version: '0.5.2'
config-version: 2
profile: 'integration_tests'
vars:
Expand All @@ -17,8 +17,8 @@ vars:
mailchimp_list_identifier: "list"
mailchimp_member_identifier: "member"
mailchimp_unsubscribe_identifier: "unsubscribe"
using_automations: true
using_segments: true
mailchimp_using_automations: true
mailchimp_using_segments: true
seeds:
mailchimp_source_integration_tests:
+quote_columns: "{{ true if target.type == 'redshift' else false }}"
Expand Down
22 changes: 13 additions & 9 deletions models/src_mailchimp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ sources:
- name: automation
identifier: "{{ var('mailchimp_automation_identifier', 'automation')}}"
description: Each record represents an automation in Mailchimp.
meta:
is_enabled: "{{ var('using_automations', true) }}"
config:
enabled: "{{ var('mailchimp_using_automations', true) }}"
columns:
- name: id
description: The ID of the automation in Mailchimp.
Expand Down Expand Up @@ -44,8 +44,8 @@ sources:
- name: automation_email
identifier: "{{ var('mailchimp_automation_email_identifier', 'automation_email')}}"
description: Each record represents an automation email (that make up automations).
meta:
is_enabled: "{{ var('using_automations', true) }}"
config:
enabled: "{{ var('mailchimp_using_automations', true) }}"
columns:
- name: id
description: The ID of the email.
Expand Down Expand Up @@ -129,8 +129,8 @@ sources:
- name: automation_recipient
identifier: "{{ var('mailchimp_automation_recipient_identifier', 'automation_recipient')}}"
description: Each record represents info about the recipient of each automation.
meta:
is_enabled: "{{ var('using_automations', true) }}"
config:
enabled: "{{ var('mailchimp_using_automations', true) }}"
columns:
- name: member_id
description: The ID of the member the automation was sent to.
Expand All @@ -144,8 +144,8 @@ sources:
- name: automation_recipient_activity
identifier: "{{ var('mailchimp_automation_recipient_activity_identifier', 'automation_recipient_activity')}}"
description: Each record represents an activity taken in relation to a automation email.
meta:
is_enabled: "{{ var('using_automations', true) }}"
config:
enabled: "{{ var('mailchimp_using_automations', true) }}"
columns:
- name: action
description: >
Expand Down Expand Up @@ -174,7 +174,6 @@ sources:
columns:
- name: id
description: The ID of the campaign in Mailchimp.

- name: segment_id
description: The ID of the Segment a campaign was sent to.
- name: create_time
Expand Down Expand Up @@ -304,6 +303,8 @@ sources:
- name: segment
identifier: "{{ var('mailchimp_segment_identifier', 'segment')}}"
description: Each record represents a segment in Mailchimp.
config:
enabled: "{{ var('mailchimp_using_segments', true) }}"
columns:
- name: id
description: The ID for the Segment from Mailchimp
Expand All @@ -323,9 +324,12 @@ sources:
description: UTC timestamp that indicates the time when Fivetran last successfully synced the row.
- name: _fivetran_deleted
description: Boolean that is true if the row has been soft-deleted from the source.

- name: segment_member
identifier: "{{ var('mailchimp_segment_member_identifier', 'segment_member')}}"
description: Each record represents a member and their segment data.
config:
enabled: "{{ var('mailchimp_using_segments', true) }}"
columns:
- name: segment_id
description: The ID for the Segment from Mailchimp.
Expand Down
2 changes: 1 addition & 1 deletion models/stg_mailchimp__campaign_activities.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final as (
campaign_id,
member_id,
list_id,
timestamp as activity_timestamp,
cast(timestamp as {{ dbt.type_timestamp() }}) as activity_timestamp,
ip as ip_address,
url,
bounce_type,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_mailchimp__campaigns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final as (
id as campaign_id,
segment_id,
create_time as create_timestamp,
send_time as send_timestamp,
cast(send_time as {{ dbt.type_timestamp() }}) as send_timestamp,
list_id,
reply_to as reply_to_email,
type as campaign_type,
Expand Down

0 comments on commit 5d8668e

Please sign in to comment.