Skip to content

Commit

Permalink
Merge pull request #14 from fivetran/MagicBot_729d1f2e4c
Browse files Browse the repository at this point in the history
[MagicBot] Bumping package version
  • Loading branch information
fivetran-joemarkiewicz authored Jul 28, 2021
2 parents 7311df8 + f37025a commit c9ece8e
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 14 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Apache License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![dbt logo and version](https://img.shields.io/static/v1?logo=dbt&label=dbt-version&message=0.20.x&color=orange)
# Pinterest Ads ([docs](https://fivetran-dbt-pinterest.netlify.app/#!/overview))

This package models Pinterest Ads data from [Fivetran's connector](https://fivetran.com/docs/applications/pinterest-ads). It uses data in the format described by [this ERD](https://fivetran.com/docs/applications/pinterest-ads#schemainformation).
Expand All @@ -19,6 +20,14 @@ This package contains transformation models, designed to work simultaneously wit
## Installation Instructions
Check [dbt Hub](https://hub.getdbt.com/) for the latest installation instructions, or [read the dbt docs](https://docs.getdbt.com/docs/package-management) for more information on installing packages.

Include in your `packages.yml`

```yaml
packages:
- package: fivetran/pinterest
version: [">=0.4.0", "<0.5.0"]
```
## Configuration
By default, this package will look for your Pinterest Ads data in the `pinterest_ads` schema of your [target database](https://docs.getdbt.com/docs/running-a-dbt-project/using-the-command-line-interface/configure-your-profile). If this is not where your Pinterest Ads data is, add the following configuration to your `dbt_project.yml` file:

Expand Down Expand Up @@ -67,6 +76,16 @@ models:

This package has been tested on BigQuery, Snowflake, Redshift, Postgres, and Databricks.

### Databricks Dispatch Configuration
dbt `v0.20.0` introduced a new project-level dispatch configuration that enables an "override" setting for all dispatched macros. If you are using a Databricks destination with this package you will need to add the below (or a variation of the below) dispatch configuration within your `dbt_project.yml`. This is required in order for the package to accurately search for macros within the `dbt-labs/spark_utils` then the `dbt-labs/dbt_utils` packages respectively.
```yml
# dbt_project.yml
dispatch:
- macro_namespace: dbt_utils
search_order: ['spark_utils', 'dbt_utils']
```

## Contributions

Additional contributions to this package are very welcome! Please create issues
Expand All @@ -76,7 +95,7 @@ on the best workflow for contributing to a package.

## Resources:
- Provide [feedback](https://www.surveymonkey.com/r/DQ7K7WW) on our existing dbt packages or what you'd like to see next
- Have questions or feedback, or need help? Book a time during our office hours [here](https://calendly.com/fivetran-solutions-team/fivetran-solutions-team-office-hours) or shoot us an email at solutions@fivetran.com.
- Have questions or feedback, or need help? Book a time during our office hours [here](https://calendly.com/fivetran-solutions-team/fivetran-solutions-team-office-hours) or email us at solutions@fivetran.com.
- Find all of Fivetran's pre-built dbt packages in our [dbt hub](https://hub.getdbt.com/fivetran/)
- Learn how to orchestrate dbt transformations with Fivetran [here](https://fivetran.com/docs/transformations/dbt).
- Learn more about Fivetran overall [in our docs](https://fivetran.com/docs)
Expand Down
10 changes: 3 additions & 7 deletions dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
name: 'pinterest'
version: '0.3.3'
version: '0.4.0'
config-version: 2
require-dbt-version: [">=0.18.0", "<0.20.0"]

require-dbt-version: [">=0.20.0"]
models:
pinterest:
+schema: pinterest
+materialized: table
intermediate:
+materialized: ephemeral

vars:
pinterest:
pinterest:
pin_promotion_report: "{{ ref('stg_pinterest_ads__pin_promotion_report') }}"
ad_group_history: "{{ ref('stg_pinterest_ads__ad_group_history') }}"
campaign_history: "{{ ref('stg_pinterest_ads__campaign_history') }}"
pin_promotion_history: "{{ ref('stg_pinterest_ads__pin_promotion_history') }}"
pin_promotion_report_pass_through_metric: []
dbt_utils_dispatch_list: ['spark_utils', 'fivetran_utils']
fivetran_utils_dispatch_list: ['spark_utils']
8 changes: 6 additions & 2 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'pinterest_integration_tests'
version: '0.3.3'
version: '0.4.0'
profile: 'integration_tests'
config-version: 2

Expand Down Expand Up @@ -30,4 +30,8 @@ seeds:
PIN_PROMOTION_ID: "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"
AD_GROUP_ID: "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"
CAMPAIGN_ID: "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"
ADVERTISER_ID: "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"
ADVERTISER_ID: "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"

dispatch:
- macro_namespace: dbt_utils
search_order: ['spark_utils', 'dbt_utils']
6 changes: 3 additions & 3 deletions integration_tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dbt==0.19.1
dbt-spark==0.19.1
dbt-spark[PyHive]==0.19.1
dbt==0.20.0
dbt-spark==0.20.0
dbt-spark[PyHive]==0.20.0
2 changes: 1 addition & 1 deletion packages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- package: fivetran/pinterest_source
version: [">=0.3.0", "<0.4.0"]
version: [">=0.4.0", "<0.5.0"]

0 comments on commit c9ece8e

Please sign in to comment.