diff --git a/README.md b/README.md index e8e53ce..8805f2c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[](https://opensource.org/licenses/Apache-2.0)  # LinkedIn Ad Analytics ([docs](https://fivetran-dbt-linkedin.netlify.app/#!/overview)) This package models LinkedIn Ad Analytics data from [Fivetran's connector](https://fivetran.com/docs/applications/linkedin-ads). It uses data in the format described by [this ERD](https://fivetran.com/docs/applications/linkedin-ads#schemainformation). @@ -18,6 +19,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/linkedin + version: [">=0.3.0", "<0.4.0"] +``` + ## Configuration By default, this package will look for your LinkedIn Ad Analytics data in the `linkedin_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 LinkedIn Ad Analytics data is, please add the following configuration to your `dbt_project.yml` file: @@ -81,6 +90,16 @@ on the best workflow for contributing to a package. ## Database Support 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'] +``` + ## Resources: - Provide [feedback](https://www.surveymonkey.com/r/DQ7K7WW) on our existing dbt packages or what you'd like to see next - Have questions, feedback, or need help? Book a time during our office hours [using Calendly](https://calendly.com/fivetran-solutions-team/fivetran-solutions-team-office-hours) or email us at solutions@fivetran.com diff --git a/dbt_project.yml b/dbt_project.yml index 2308468..ba41439 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,22 +1,16 @@ - name: 'linkedin' -version: '0.3.1' +version: '0.3.0' config-version: 2 -require-dbt-version: [">=0.18.0", "<0.20.0"] - +require-dbt-version: [">=0.20.0"] vars: - linkedin: - ad_analytics_by_creative: "{{ ref('stg_linkedin__ad_analytics_by_creative') }}" - creative_history: "{{ ref('stg_linkedin__creative_history') }}" - campaign_history: "{{ ref('stg_linkedin__campaign_history') }}" - campaign_group_history: "{{ ref('stg_linkedin__campaign_group_history') }}" - account_history: "{{ ref('stg_linkedin__account_history') }}" - dbt_utils_dispatch_list: ['spark_utils', 'fivetran_utils'] - fivetran_utils_dispatch_list: ['spark_utils'] - - linkedin__passthrough_metrics: [] - + linkedin: + ad_analytics_by_creative: "{{ ref('stg_linkedin__ad_analytics_by_creative') }}" + creative_history: "{{ ref('stg_linkedin__creative_history') }}" + campaign_history: "{{ ref('stg_linkedin__campaign_history') }}" + campaign_group_history: "{{ ref('stg_linkedin__campaign_group_history') }}" + account_history: "{{ ref('stg_linkedin__account_history') }}" + linkedin__passthrough_metrics: [] models: - linkedin: - +materialized: table - +schema: linkedin + linkedin: + +materialized: table + +schema: linkedin diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 87ed696..d45987c 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,5 +1,5 @@ name: 'linkedin_integration_tests' -version: '0.3.1' +version: '0.3.0' profile: 'integration_tests' config-version: 2 @@ -36,4 +36,7 @@ seeds: linkedin_creative_history_data: +column_types: created_time: timestamp - last_modified_time: timestamp \ No newline at end of file + last_modified_time: timestamp +dispatch: + - macro_namespace: dbt_utils + search_order: ['spark_utils', 'dbt_utils'] diff --git a/integration_tests/requirements.txt b/integration_tests/requirements.txt index b0df5fe..b06ff52 100644 --- a/integration_tests/requirements.txt +++ b/integration_tests/requirements.txt @@ -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 diff --git a/packages.yml b/packages.yml index f583465..ab6a731 100644 --- a/packages.yml +++ b/packages.yml @@ -1,3 +1,3 @@ -packages: - - package: fivetran/linkedin_source - version: [">=0.2.0", "<0.3.0"] +packages: +- package: fivetran/linkedin_source + version: [">=0.3.0", "<0.4.0"]