Skip to content

Comments

fix(asana): add column_types for solution seeds on Snowflake#108

Draft
sfc-gh-zblackwood wants to merge 1 commit intodbt-labs:mainfrom
sfc-gh-zblackwood:fix/asana-seed-column-types
Draft

fix(asana): add column_types for solution seeds on Snowflake#108
sfc-gh-zblackwood wants to merge 1 commit intodbt-labs:mainfrom
sfc-gh-zblackwood:fix/asana-seed-column-types

Conversation

@sfc-gh-zblackwood
Copy link
Contributor

Problem

Solution seed CSV files in asana tasks have numeric values (0/1) for columns that the dbt models output as BOOLEAN or TIMESTAMP_NTZ. Snowflake infers these as NUMBER(38,0) when loading seeds, causing type mismatch errors in equality tests:

SQL compilation error:
    inconsistent data type for result columns for set operator input branches,
    expected TIMESTAMP_NTZ(0), got NUMBER(38,0)
    expected BOOLEAN, got NUMBER(38,0)

Solution

Add explicit +column_types definitions in dbt_project.yml for the solution seeds:

  • solution__asana__task: BOOLEAN columns (is_completed, is_liked, is_currently_assigned, has_been_assigned, is_subtask) and TIMESTAMP columns (completed_at, created_at, due_date, etc.)
  • solution__asana__project: BOOLEAN columns (is_archived, is_public) and TIMESTAMP columns (created_at, due_date, last_modified_at)
  • solution__asana__tag: TIMESTAMP column (created_at)
  • solution__int_asana__task_story: TIMESTAMP column (created_at)

Affected Tasks

  • asana001
  • asana002
  • asana003
  • asana004
  • asana005

Solution seed CSV files have numeric values (0/1) for columns that dbt
models output as BOOLEAN or TIMESTAMP_NTZ. Snowflake infers these as
NUMBER(38,0) when loading seeds, causing type mismatch errors in
equality tests.

Add explicit column_types for:
- solution__asana__task: BOOLEAN and TIMESTAMP columns
- solution__asana__project: BOOLEAN and TIMESTAMP columns
- solution__asana__tag: TIMESTAMP columns
- solution__int_asana__task_story: TIMESTAMP columns

This fixes SQL compilation errors like:
  inconsistent data type for result columns for set operator input branches,
  expected TIMESTAMP_NTZ(0), got NUMBER(38,0)
  expected BOOLEAN, got NUMBER(38,0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant