From e3af5fa8611344b3ab2e095128a860fad41f8e9e Mon Sep 17 00:00:00 2001 From: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Tue, 12 May 2026 20:13:00 -0500 Subject: [PATCH 1/4] Buildkite improvements --- .buildkite/hooks/pre-command | 25 -------- .buildkite/pipeline.yml | 74 ------------------------ .buildkite/scripts/run_models.sh | 24 -------- integration_tests/ci/sample.profiles.yml | 50 ---------------- integration_tests/ci/test_scenarios.yml | 27 +++++++++ integration_tests/dbt_project.yml | 6 +- 6 files changed, 28 insertions(+), 178 deletions(-) delete mode 100644 .buildkite/hooks/pre-command delete mode 100644 .buildkite/pipeline.yml delete mode 100644 .buildkite/scripts/run_models.sh delete mode 100644 integration_tests/ci/sample.profiles.yml create mode 100644 integration_tests/ci/test_scenarios.yml diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command deleted file mode 100644 index 81b7b00..0000000 --- a/.buildkite/hooks/pre-command +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -e - -# Export secrets for Docker containers. -# Restrict exposing secrets only to the steps that need them -export GCLOUD_SERVICE_KEY=$(gcloud secrets versions access latest --secret="GCLOUD_SERVICE_KEY" --project="dbt-package-testing-363917") -export CI_POSTGRES_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_HOST" --project="dbt-package-testing-363917") -export CI_POSTGRES_DBT_USER=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_USER" --project="dbt-package-testing-363917") -export CI_POSTGRES_DBT_PASS=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_PASS" --project="dbt-package-testing-363917") -export CI_POSTGRES_DBT_DBNAME=$(gcloud secrets versions access latest --secret="CI_POSTGRES_DBT_DBNAME" --project="dbt-package-testing-363917") -export CI_REDSHIFT_DBT_DBNAME=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_DBNAME" --project="dbt-package-testing-363917") -export CI_REDSHIFT_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_HOST" --project="dbt-package-testing-363917") -export CI_REDSHIFT_DBT_PASS=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_PASS" --project="dbt-package-testing-363917") -export CI_REDSHIFT_DBT_USER=$(gcloud secrets versions access latest --secret="CI_REDSHIFT_DBT_USER" --project="dbt-package-testing-363917") -export CI_SNOWFLAKE_DBT_ACCOUNT=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_ACCOUNT" --project="dbt-package-testing-363917") -export CI_SNOWFLAKE_DBT_DATABASE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_DATABASE" --project="dbt-package-testing-363917") -export CI_SNOWFLAKE_DBT_PASS=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_PASS" --project="dbt-package-testing-363917") -export CI_SNOWFLAKE_DBT_ROLE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_ROLE" --project="dbt-package-testing-363917") -export CI_SNOWFLAKE_DBT_USER=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_USER" --project="dbt-package-testing-363917") -export CI_SNOWFLAKE_DBT_WAREHOUSE=$(gcloud secrets versions access latest --secret="CI_SNOWFLAKE_DBT_WAREHOUSE" --project="dbt-package-testing-363917") -export CI_DATABRICKS_DBT_HOST=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_HOST" --project="dbt-package-testing-363917") -export CI_DATABRICKS_DBT_HTTP_PATH=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_HTTP_PATH" --project="dbt-package-testing-363917") -export CI_DATABRICKS_DBT_TOKEN=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_TOKEN" --project="dbt-package-testing-363917") -export CI_DATABRICKS_DBT_CATALOG=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_CATALOG" --project="dbt-package-testing-363917") \ No newline at end of file diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml deleted file mode 100644 index e41dc00..0000000 --- a/.buildkite/pipeline.yml +++ /dev/null @@ -1,74 +0,0 @@ -steps: - - label: ":postgres: Run Tests - Postgres" - key: "run-dbt-postgres" - plugins: - - docker#v3.13.0: - image: "python:3.10.13" - shell: [ "/bin/bash", "-e", "-c" ] - environment: - - "BASH_ENV=/tmp/.bashrc" - - "CI_POSTGRES_DBT_DBNAME" - - "CI_POSTGRES_DBT_HOST" - - "CI_POSTGRES_DBT_PASS" - - "CI_POSTGRES_DBT_USER" - commands: | - bash .buildkite/scripts/run_models.sh postgres - - - label: ":snowflake-db: Run Tests - Snowflake" - key: "run_dbt_snowflake" - plugins: - - docker#v3.13.0: - image: "python:3.10.13" - shell: [ "/bin/bash", "-e", "-c" ] - environment: - - "BASH_ENV=/tmp/.bashrc" - - "CI_SNOWFLAKE_DBT_ACCOUNT" - - "CI_SNOWFLAKE_DBT_DATABASE" - - "CI_SNOWFLAKE_DBT_PASS" - - "CI_SNOWFLAKE_DBT_ROLE" - - "CI_SNOWFLAKE_DBT_USER" - - "CI_SNOWFLAKE_DBT_WAREHOUSE" - commands: | - bash .buildkite/scripts/run_models.sh snowflake - - - label: ":gcloud: Run Tests - BigQuery" - key: "run_dbt_bigquery" - plugins: - - docker#v3.13.0: - image: "python:3.10.13" - shell: [ "/bin/bash", "-e", "-c" ] - environment: - - "BASH_ENV=/tmp/.bashrc" - - "GCLOUD_SERVICE_KEY" - commands: | - bash .buildkite/scripts/run_models.sh bigquery - - - label: ":amazon-redshift: Run Tests - Redshift" - key: "run_dbt_redshift" - plugins: - - docker#v3.13.0: - image: "python:3.10.13" - shell: [ "/bin/bash", "-e", "-c" ] - environment: - - "BASH_ENV=/tmp/.bashrc" - - "CI_REDSHIFT_DBT_DBNAME" - - "CI_REDSHIFT_DBT_HOST" - - "CI_REDSHIFT_DBT_PASS" - - "CI_REDSHIFT_DBT_USER" - commands: | - bash .buildkite/scripts/run_models.sh redshift - - - label: ":databricks: Run Tests - Databricks" - key: "run_dbt_databricks" - plugins: - - docker#v3.13.0: - image: "python:3.10.13" - shell: [ "/bin/bash", "-e", "-c" ] - environment: - - "BASH_ENV=/tmp/.bashrc" - - "CI_DATABRICKS_DBT_CATALOG" - - "CI_DATABRICKS_DBT_HOST" - - "CI_DATABRICKS_DBT_HTTP_PATH" - - "CI_DATABRICKS_DBT_TOKEN" - commands: | - bash .buildkite/scripts/run_models.sh databricks \ No newline at end of file diff --git a/.buildkite/scripts/run_models.sh b/.buildkite/scripts/run_models.sh deleted file mode 100644 index 9e42be0..0000000 --- a/.buildkite/scripts/run_models.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -apt-get update -apt-get install libsasl2-dev - -python3 -m venv venv -. venv/bin/activate -pip install --upgrade pip setuptools -pip install -r integration_tests/requirements.txt -mkdir -p ~/.dbt -cp integration_tests/ci/sample.profiles.yml ~/.dbt/profiles.yml - -db=$1 -echo `pwd` -cd integration_tests -dbt deps -dbt seed --target "$db" --full-refresh -dbt run --target "$db" --full-refresh -dbt test --target "$db" -dbt run --vars '{linkedin_ads__use_local_currency: true, ad_reporting__url_report__using_null_filter: false, linkedin_ads__using_geo: False, linkedin_ads__using_monthly_ad_analytics_by_member_country: False, linkedin_ads__using_monthly_ad_analytics_by_member_region: False}' --target "$db" --full-refresh -dbt test --vars '{linkedin_ads__use_local_currency: true, ad_reporting__url_report__using_null_filter: false, linkedin_ads__using_geo: False, linkedin_ads__using_monthly_ad_analytics_by_member_country: False, linkedin_ads__using_monthly_ad_analytics_by_member_region: False}' --target "$db" -dbt run-operation fivetran_utils.drop_schemas_automation --target "$db" diff --git a/integration_tests/ci/sample.profiles.yml b/integration_tests/ci/sample.profiles.yml deleted file mode 100644 index 75b3d05..0000000 --- a/integration_tests/ci/sample.profiles.yml +++ /dev/null @@ -1,50 +0,0 @@ - -# HEY! This file is used in the dbt package integrations tests with Buildkite. -# You should __NEVER__ check credentials into version control. Thanks for reading :) - -integration_tests: - target: redshift - outputs: - redshift: - type: redshift - host: "{{ env_var('CI_REDSHIFT_DBT_HOST') }}" - user: "{{ env_var('CI_REDSHIFT_DBT_USER') }}" - pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}" - dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}" - port: 5439 - schema: linkedin_integration_tests_5 - threads: 8 - bigquery: - type: bigquery - method: service-account-json - project: 'dbt-package-testing' - schema: linkedin_integration_tests_5 - threads: 8 - keyfile_json: "{{ env_var('GCLOUD_SERVICE_KEY') | as_native }}" - snowflake: - type: snowflake - account: "{{ env_var('CI_SNOWFLAKE_DBT_ACCOUNT') }}" - user: "{{ env_var('CI_SNOWFLAKE_DBT_USER') }}" - password: "{{ env_var('CI_SNOWFLAKE_DBT_PASS') }}" - role: "{{ env_var('CI_SNOWFLAKE_DBT_ROLE') }}" - database: "{{ env_var('CI_SNOWFLAKE_DBT_DATABASE') }}" - warehouse: "{{ env_var('CI_SNOWFLAKE_DBT_WAREHOUSE') }}" - schema: linkedin_integration_tests_5 - threads: 8 - postgres: - type: postgres - host: "{{ env_var('CI_POSTGRES_DBT_HOST') }}" - user: "{{ env_var('CI_POSTGRES_DBT_USER') }}" - pass: "{{ env_var('CI_POSTGRES_DBT_PASS') }}" - dbname: "{{ env_var('CI_POSTGRES_DBT_DBNAME') }}" - port: 5432 - schema: linkedin_integration_tests_5 - threads: 8 - databricks: - catalog: "{{ env_var('CI_DATABRICKS_DBT_CATALOG') }}" - host: "{{ env_var('CI_DATABRICKS_DBT_HOST') }}" - http_path: "{{ env_var('CI_DATABRICKS_DBT_HTTP_PATH') }}" - schema: linkedin_integration_tests_5 - threads: 8 - token: "{{ env_var('CI_DATABRICKS_DBT_TOKEN') }}" - type: databricks \ No newline at end of file diff --git a/integration_tests/ci/test_scenarios.yml b/integration_tests/ci/test_scenarios.yml new file mode 100644 index 0000000..638d7aa --- /dev/null +++ b/integration_tests/ci/test_scenarios.yml @@ -0,0 +1,27 @@ +# Only set if not using default adapter ranges +# dbt_adapter_versions: +# snowflake: ">=1.3.0,<2.0.0" +# bigquery: ">=1.3.0,<2.0.0" +# postgres: ">=1.3.0,<2.0.0" +# redshift: ">=1.3.0,<2.0.0" +# databricks: ">=1.6.0,<2.0.0" + +schema_variable_name: "linkedin_ads_schema" + +include_databricks_sql: false +include_sqlserver: false +include_dbt_compile: true + +test_scenarios: + - name: "Default" + vars: {} + include_incremental: false + + - name: "local currency geo disabled" + vars: + linkedin_ads__use_local_currency: true + ad_reporting__url_report__using_null_filter: false + linkedin_ads__using_geo: false + linkedin_ads__using_monthly_ad_analytics_by_member_country: false + linkedin_ads__using_monthly_ad_analytics_by_member_region: false + include_incremental: false \ No newline at end of file diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 2208e2f..7504b08 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -5,7 +5,7 @@ config-version: 2 vars: linkedin: - linkedin_ads_schema: linkedin_integration_tests_5 + linkedin_ads_schema: linkedin_integration_tests linkedin_ads_account_history_identifier: "linkedin_account_history_data" linkedin_ads_ad_analytics_by_creative_identifier: "linkedin_ad_analytics_by_creative_data" linkedin_ads_campaign_group_history_identifier: "linkedin_campaign_group_history_data" @@ -34,12 +34,8 @@ seeds: linkedin_creative_history_data: +column_types: created_time: timestamp - last_modified_time: timestamp - created_at: timestamp - last_modified_at: timestamp click_uri: "{{ 'string' if target.type in ('bigquery','spark','databricks') else 'varchar' }}" intended_status: "{{ 'string' if target.type in ('bigquery','spark','databricks') else 'varchar' }}" - status: "{{ 'string' if target.type in ('bigquery','spark','databricks') else 'varchar' }}" linkedin_ad_analytics_by_creative_data: +column_types: day: timestamp From 9fbad3c0a4251f1f2cac7111dc33ad7e9aaa4937 Mon Sep 17 00:00:00 2001 From: fivetran-catfritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Tue, 12 May 2026 20:35:22 -0500 Subject: [PATCH 2/4] Update dbt_project.yml --- integration_tests/dbt_project.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 7504b08..030fe0f 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -34,8 +34,12 @@ seeds: linkedin_creative_history_data: +column_types: created_time: timestamp + last_modified_time: timestamp + created_at: timestamp + last_modified_at: timestamp click_uri: "{{ 'string' if target.type in ('bigquery','spark','databricks') else 'varchar' }}" intended_status: "{{ 'string' if target.type in ('bigquery','spark','databricks') else 'varchar' }}" + status: "{{ 'string' if target.type in ('bigquery','spark','databricks') else 'varchar' }}" linkedin_ad_analytics_by_creative_data: +column_types: day: timestamp @@ -66,4 +70,4 @@ dispatch: flags: send_anonymous_usage_stats: False - use_colors: True \ No newline at end of file + use_colors: True From 237cb3a7091f091b559339531c980b0309353a6c Mon Sep 17 00:00:00 2001 From: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Thu, 14 May 2026 17:27:19 -0500 Subject: [PATCH 3/4] update col types --- integration_tests/dbt_project.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 030fe0f..4bbd1c7 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -34,12 +34,9 @@ seeds: linkedin_creative_history_data: +column_types: created_time: timestamp - last_modified_time: timestamp - created_at: timestamp last_modified_at: timestamp click_uri: "{{ 'string' if target.type in ('bigquery','spark','databricks') else 'varchar' }}" intended_status: "{{ 'string' if target.type in ('bigquery','spark','databricks') else 'varchar' }}" - status: "{{ 'string' if target.type in ('bigquery','spark','databricks') else 'varchar' }}" linkedin_ad_analytics_by_creative_data: +column_types: day: timestamp From 96552a69e4864b187d609cf185f9a82276502853 Mon Sep 17 00:00:00 2001 From: fivetran-catfritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Thu, 14 May 2026 17:28:06 -0500 Subject: [PATCH 4/4] Update test_scenarios.yml --- integration_tests/ci/test_scenarios.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration_tests/ci/test_scenarios.yml b/integration_tests/ci/test_scenarios.yml index 638d7aa..a61867b 100644 --- a/integration_tests/ci/test_scenarios.yml +++ b/integration_tests/ci/test_scenarios.yml @@ -17,11 +17,11 @@ test_scenarios: vars: {} include_incremental: false - - name: "local currency geo disabled" + - name: "toggle vars" vars: linkedin_ads__use_local_currency: true ad_reporting__url_report__using_null_filter: false linkedin_ads__using_geo: false linkedin_ads__using_monthly_ad_analytics_by_member_country: false linkedin_ads__using_monthly_ad_analytics_by_member_region: false - include_incremental: false \ No newline at end of file + include_incremental: false