Will Custom Context in standard snowplow javascript tracker event be recognised as an attribute in google pub/sub?

Hello Team,

I am trying to make use of the Custom Context in snowplow javascript tracker.

Will this custom context be identified as an attribute in google pub/sub subscription? I am trying to make use of the filter option in google pub/sub subscription to filter out relevant messages based on this attribute. I am not very sure if this is the right way to go about this.

This is our snowplow setup in google kubernetes engine.
JS tracker → collector(gke) → google pub/sub → enricher → google pub/sub → stream loader → Google Big query

These are the versions used.

Collector : snowplow/scala-stream-collector-pubsub:2.4.5
Enricher  : snowplow/snowplow-enrich-pubsub:2.0.5
Stream_loader : snowplow/snowplow-bigquery-streamloader:1.2.0
Repeater : snowplow/snowplow-bigquery-streamloader:1.2.0
Mutator : snowplow/snowplow-bigquery-mutator:1.2.0

Any help is really appreciated.

Not by default no. If you want to filter on the event name (unstruct event) this is possible but as far as I know I don’t think it’s possible to do this for contexts.

To filter on event name you can specify event_name in the attributes section of enrich pubsub here.

Thanks @mike for this, I somehow missed this configuration option.

1 Like

@mike On this same topic, we are using a custom context schema iglu:com.XXXX/YYYY/jsonschema/1-0-1 and it has a field called platform, Its not possible to get that platform as an attribute in enricher config output.good.attribute right?

Is there a way to get it set in enricher.config and then use it in the pub/sub subscription filter?

I don’t believe so - in part because contexts will be an array so you’d need some way of specifying the correct index as part of the expressions. As far as I’m aware we support most enriched fields which can be casted to strings but not context values unfortunately.

@mike Ahh unfortunate, thanks mike for the quick response. Really appreciate.