fivetran / dbt_snapchat_ads_source

Fivetran's Snapchat Ads source dbt package
https://fivetran.github.io/dbt_snapchat_ads_source/
Apache License 2.0
1 stars 4 forks source link

BUG - creative_url_tag_history test failure #10

Closed tac14yo closed 2 years ago

tac14yo commented 2 years ago

Are you a current Fivetran customer?

Tyler Schmidt, Data Scientist, Toggle/Farmers Insurance

Describe the bug

The unique_combination_of_columns test for stg_snapchat__creative_url_tag_history is giving a failure because of updated_at field not being included as part of the unique check despite being the ORDER BY for the is_most_recent_record

Steps to reproduce

  1. Excute dbt test --select dbt_utils_unique_combination_of_columns_stg_snapchat__creative_url_tag_history_creative_id__param_key
  2. See error

Expected behavior

I would exepct it to pass as the only reason for duplicate is updates to the information via the normal data flow (updated_at)

Project variables configuration

name: 'toggle_data_wh'
version: '1.0.0'
config-version: 2

# This setting configures which "profile" dbt uses for this project.
profile: 'toggle_data_wh'

# These configurations specify where dbt should look for different types of files.
# The `source-paths` config, for example, states that models in this project can be
# found in the "models/" directory. You probably won't need to change these!
model-paths: ["models"]
analysis-paths: ["analysis"]
test-paths: ["tests"]
seed-paths: ["data"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]

target-path: "target"  # directory which will store compiled SQL files
clean-targets:         # directories to be removed by `dbt clean`
  - "target"
  - "dbt_packages"

# Configuring models
# Full documentation: https://docs.getdbt.com/docs/configuring-models

# In this example config, we tell dbt to build all models in the example/ directory
# as tables. These settings can be overridden in the individual model files
# using the `{{ config(...) }}` macro.
models:
  toggle_data_wh:
    +materialized: table
    staging:
      +materialized: view
  snapchat_ads_source:
    +schema: stg_ads

vars:
  snapchat_ads_source:
    snapchat_database: fnv_raw_db
    snapchat_schema: snapchat_ads 

Package Version

packages:

  - package: Datavault-UK/dbtvault
    version: 0.7.9

#  - package: fivetran/ad_reporting
#    version: 0.2.3

  - package: fivetran/snapchat_ads_source
    version: 0.3.0

Warehouse

- [ ] BigQuery - [ ] Redshift - [x] Snowflake - [ ] Postgres - [ ] Databricks - [ ] Other (provide details below) **Additional context** **Screenshots**

Please indicate the level of urgency

This is not urgent as we turned off the test in production via --exclude .... and will not be updating our production run to DBT 1.0 for a bit so we will not be able to utlize any changes till after then anyway.

Are you interested in contributing to this package?

fivetran-joemarkiewicz commented 2 years ago

Hey @tac14yo thanks so much for opening this issue!

Our team will take a look into this and will let you know if we have any questions.

fivetran-jamie commented 2 years ago

hey there @tac14yo this is in v0.3.1 which will be up on the hub shortly! it is only dbt v0.1.* compatible however