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
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.
@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.