R2T8
R2T8

Reputation: 2590

Not sending Firebase events with null values to BigQuery

Is there a way to not send Firebase events with null values to BigQuery? Is it possible to normalize it?

In the picture below you can see the null values in BigQuery. enter image description here

Flutter Code:

  final analytics = FirebaseAnalytics.instance;
  analytics.logEvent(name: eventName, parameters: params);

Upvotes: 0

Views: 619

Answers (1)

Dan Harms
Dan Harms

Reputation: 4840

You can use removeWhere to filter out null values prior to logging the event.

params.removeWhere((k, v) => v == null);
if (params.isNotEmpty) {
  analytics.logEvent(name: eventName, parameters: params);
}

Upvotes: 2

Related Questions