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

user_id in segment.pages is bigint and can't be unioned with varchar #9

Open
ernestoongaro opened this issue Jan 4, 2018 · 0 comments

Comments

@ernestoongaro
Copy link

Getting these errors:

UNION types character varying and bigint cannot be matched
COALESCE types bigint and character varying cannot be matched

so added cast of user_id to varchar in the following places and working fine. Not sure if Segment changed the user_id type in the Redshift destination or why this happened now.

segment_1_aliases_mapping.view.lkml-        union
segment_1_aliases_mapping.view.lkml-
segment_1_aliases_mapping.view.lkml:        select user_id::varchar
segment_1_aliases_mapping.view.lkml-          , null
segment_1_aliases_mapping.view.lkml-          , received_at
--
--
segment__A_alias_mapping.view.lkml-
segment__A_alias_mapping.view.lkml-        select anonymous_id
segment__A_alias_mapping.view.lkml:          , user_id::varchar
segment__A_alias_mapping.view.lkml-          , received_at
segment__A_alias_mapping.view.lkml-        from segment.pages
--
--
segment__A_alias_mapping.view.lkml-        union
segment__A_alias_mapping.view.lkml-
segment__A_alias_mapping.view.lkml:        select user_id::varchar
segment__A_alias_mapping.view.lkml-        , null
segment__A_alias_mapping.view.lkml-        , received_at
--
--
segment__B_mapped_events.view.lkml-        from segment.pages as t
segment__B_mapped_events.view.lkml-        inner join ${page_aliases_mapping.SQL_TABLE_NAME} as a2v
segment__B_mapped_events.view.lkml:          on a2v.alias = coalesce(t.user_id::varchar, t.anonymous_id)
segment__B_mapped_events.view.lkml-      ) as e
segment__B_mapped_events.view.lkml-       ;;
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

No branches or pull requests

1 participant