dbt-labs / snowplow

Data models for snowplow analytics.
https://hub.getdbt.com/dbt-labs/snowplow/latest/
Apache License 2.0
126 stars 45 forks source link

Compilation Error in model snowplow_web_ua_parser_context (models/page_views/optional/snowplow_web_ua_parser_context.sql) at path ['enabled']: None is not of type 'boolean' Code: 10004 #105

Open nickdcox opened 3 years ago

nickdcox commented 3 years ago

When trying to install snowplow using the following packages.yml file:

packages:

this error is generated:

Installing fishtown-analytics/snowplow@0.12.0 Installed from version 0.12.0

Installing fishtown-analytics/dbt_utils@0.6.6 Installed from version 0.6.6

Compilation Error in model snowplow_web_ua_parser_context (models/page_views/optional/snowplow_web_ua_parser_context.sql) at path ['enabled']: None is not of type 'boolean' Code: 10004

jtcohen6 commented 3 years ago

Hey @nickdcox, this error will appear if you haven't set a value for the variable snowplow:context:useragent, resulting in a None value here:

https://github.com/fishtown-analytics/snowplow/blob/f24a2bf91d4ce44f789d1cae0e33d85aa7f8eb58/models/page_views/optional/snowplow_web_ua_parser_context.sql#L6

This package requires you to specify a number of configuration variables in your dbt_project.yml. It should look something like:

# dbt_project.yml

...

vars:
  'snowplow:timezone': 'America/New_York'
  'snowplow:page_ping_frequency': 10
  'snowplow:events': "{{ ref('sp_base_events') }}"
  'snowplow:context:web_page': "{{ ref('sp_base_web_page_context') }}"
  'snowplow:context:performance_timing': false
  'snowplow:context:useragent': false
  'snowplow:pass_through_columns': []
  'snowplow:page_view_lookback_days': 1

We could avoid this specific error message by editing the line at the top to be:

enabled=(var('snowplow:context:useragent', false) and is_adapter('default'))
anujkumarsi commented 2 years ago

I am still getting the same error. can you please help me to provide full configuration file

anujkumarsi commented 2 years ago

Now I am getting below error

Compilation Error in model snowplow_base_web_page_context (models/base/snowplow_base_web_page_context.sql) Model 'model.snowplow.snowplow_base_web_page_context' (models/base/snowplow_base_web_page_context.sql) depends on a node named 'sp_base_web_page_context' which was not found Code: 10004