Skip to content

Commit

Permalink
Set ignore_unknown when inserting to BQ
Browse files Browse the repository at this point in the history
This means that if a schema in BQ lacks a field in our schema, it won’t
cause an exception and the (presumably blank) field will just be dropped
  • Loading branch information
duncanjbrown committed Apr 21, 2022
1 parent 3f527f4 commit 02dc49c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dfe/analytics/send_events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def perform(events)
if DfE::Analytics.log_only?
Rails.logger.info('DfE::Analytics: ' + events.inspect)
else
DfE::Analytics.events_client.insert(events)
DfE::Analytics.events_client.insert(events, ignore_unknown: true)
end
end
end
Expand Down

0 comments on commit 02dc49c

Please sign in to comment.