Skip to content

Commit

Permalink
Merge pull request #10 from fivetran/MagicBot_71bf192041
Browse files Browse the repository at this point in the history
[MagicBot] Bumping package version
  • Loading branch information
fivetran-joemarkiewicz authored Aug 4, 2021
2 parents 1510d0b + f76d6b8 commit 062c8ff
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 16 deletions.
19 changes: 19 additions & 0 deletions 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)
# Facebook Ads

This package models Facebook Ads data from [Fivetran's connector](https://fivetran.com/docs/applications/facebook-ads). It uses data in the format described by [this ERD](https://fivetran.com/docs/applications/facebook-ads#schemainformation).
Expand All @@ -19,6 +20,14 @@ This package contains transformation models, designed to work simultaneously wit

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/facebook_ads
version: [">=0.3.0", "<0.4.0"]
```
## Configuration
By default, this package will look for your Facebook Ads data in the `facebook_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 Facebook Ads data is, please add the following configuration to your `dbt_project.yml` file:
Expand Down Expand Up @@ -55,6 +64,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 or open PRs against `master`. Check out [this post](https://discourse.getdbt.com/t/contributing-to-a-dbt-package/657) on the best workflow for contributing to a package.
Expand Down
10 changes: 2 additions & 8 deletions dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@

name: 'facebook_ads'
version: '0.2.2'
version: '0.3.0'
config-version: 2

require-dbt-version: [">=0.18.0", "<0.20.0"]

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

vars:
facebook_ads:
account_history: "{{ ref('stg_facebook_ads__account_history') }}"
Expand All @@ -21,5 +17,3 @@ vars:
campaign_history: "{{ ref('stg_facebook_ads__campaign_history') }}"
creative_history: "{{ ref('stg_facebook_ads__creative_history') }}"
url_tag: "{{ ref('stg_facebook_ads__url_tag') }}"
dbt_utils_dispatch_list: ['spark_utils', 'fivetran_utils']
fivetran_utils_dispatch_list: ['spark_utils']
4 changes: 2 additions & 2 deletions integration_tests/ci/sample.profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ integration_tests:
spark:
type: spark
method: http
schema: facebook_ads_integration_tests
schema: facebook_ads_integration_tests_2
host: "{{ env_var('CI_SPARK_DBT_HOST') }}"
organization: "{{ env_var('CI_SPARK_DBT_ORGANIZATION') }}"
token: "{{ env_var('CI_SPARK_DBT_TOKEN') }}"
Expand All @@ -57,4 +57,4 @@ integration_tests:
schema: facebook_ads_integration_tests
threads: 8
keepalives_idle: 0
sslmode: prefer
sslmode: prefer
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: 'facebook_ads_integration_tests'
version: '0.2.2'
version: '0.3.0'
profile: 'integration_tests'
config-version: 2

Expand Down Expand Up @@ -46,4 +46,8 @@ seeds:
account_id: "{{ 'int64' if target.name == 'bigquery' else 'bigint' }}"

models:
+materialized: table
+materialized: table

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.1rc1
dbt-spark==0.20.1rc1
dbt-spark[PyHive]==0.20.1rc1
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/facebook_ads_creative_history
version: [">=0.2.0","<0.3.0"]
version: [">=0.3.0", "<0.4.0"]

0 comments on commit 062c8ff

Please sign in to comment.