Giter Site home page Giter Site logo

Comments (5)

drewbanin avatar drewbanin commented on July 23, 2024 1

Thanks for the report @sphinks! This should be a pretty quick fix, and I don't think there's any harm in allowing null values in br_family. Good catch!

from snowplow.

sphinks avatar sphinks commented on July 23, 2024

Have resolved it temporary with workaround in DBT project settings:

snowplow:
    pre-hook: "update atomic.events set br_family = '' where br_family ISNULL"

from snowplow.

drewbanin avatar drewbanin commented on July 23, 2024

Hey @sphinks! I try to avoid mutating "source" data, and would instead recommend doing this with a base model!

You could make a dbt model like:

-- models/snowplow/base/snowplow_base_events_fixed.sql

select
  *,
  nullif(br_family, '') as br_family
from atomic.events

Unfortunately, you can't actually use the *, and would instead need to enumerate the column names. That might be a good opportunity to use the star macro.

Once you have the base model, you can pass it into the Snowplow package with:

# dbt_project.yml

models:
  snowplow:
    vars:
      'snowplow:events': "{{ ref('snowplow_base_events_fixed') }}"

Thanks for the ping on this issue -- it fell off of my todo list! Will try to make a PR asap!

from snowplow.

drewbanin avatar drewbanin commented on July 23, 2024

Thanks @sphinks :)

Just merged the PR and cut a new release: https://github.com/fishtown-analytics/snowplow/releases/tag/0.5.2 🎉

from snowplow.

sphinks avatar sphinks commented on July 23, 2024

@drewbanin great! Thanks!

from snowplow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.