Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redshift: attribution_overview can't identify type for spend #9

Closed
1 of 5 tasks
jethron opened this issue Mar 26, 2024 · 1 comment
Closed
1 of 5 tasks

Redshift: attribution_overview can't identify type for spend #9

jethron opened this issue Mar 26, 2024 · 1 comment
Labels
category:macros Related to the macros in the package. category:models Related to the models in the package. good first issue Good issue for a first time contributor. status:needs_triage Needs maintainer triage. type:defect Bugs or weaknesses. The issue has to contain steps to reproduce.

Comments

@jethron
Copy link

jethron commented Mar 26, 2024

Describe the bug

When building attribution_overview with no snowplow__spend_source defined, the spend column in the CTEs is always the null value; when this model tries to aggregate the values via min(spend), it is unable to find an appropriate type and produces a ERROR: failed to find conversion function from "unknown" to text error.

Steps to reproduce

Run the attribution models on Redshift without specifying a snowplow__spend_source configuration.

Expected results

The model should run successfully, producing 0/null for spend.

Actual results

The model fails to build, producing an error.

Screenshots and log output

image

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: ____________)

Additional context

Casting the null to something more specific in the CTEs seems to resolve the issue:
cast(null as double precision) as spend

Are you interested in contributing the fix?

If you like.

@jethron jethron added good first issue Good issue for a first time contributor. type:defect Bugs or weaknesses. The issue has to contain steps to reproduce. category:models Related to the models in the package. category:macros Related to the macros in the package. labels Mar 26, 2024
@github-actions github-actions bot added the status:needs_triage Needs maintainer triage. label Mar 26, 2024
@agnessnowplow
Copy link
Collaborator

Thank you for raising this issue and apologies for not getting back to you earlier on this. The day this was raised we released v0.2.0 which I just checked should already fix this issue. An upgrade should solve this therefore I'm closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:macros Related to the macros in the package. category:models Related to the models in the package. good first issue Good issue for a first time contributor. status:needs_triage Needs maintainer triage. type:defect Bugs or weaknesses. The issue has to contain steps to reproduce.
Projects
None yet
Development

No branches or pull requests

2 participants