fix(asana): add column_types for solution seeds on Snowflake#108
Draft
sfc-gh-zblackwood wants to merge 1 commit intodbt-labs:mainfrom
Draft
fix(asana): add column_types for solution seeds on Snowflake#108sfc-gh-zblackwood wants to merge 1 commit intodbt-labs:mainfrom
sfc-gh-zblackwood wants to merge 1 commit intodbt-labs:mainfrom
Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Solution
Add explicit
+column_typesdefinitions 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