Skip to content

Enrich 5.4.0 #1269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ license {
| `telemetry.disable` | Optional. Set to `true` to disable [telemetry](/docs/get-started/snowplow-community-edition/telemetry/index.md). |
| `telemetry.userProvidedId` | Optional. See [here](/docs/get-started/snowplow-community-edition/telemetry/index.md#how-can-i-help) for more information. |
| `featureFlags.acceptInvalid` | Optional. Default: `false`. Enrich *3.0.0* introduces the validation of the enriched events against atomic schema before emitting. If set to `false`, a failed event will be emitted instead of the enriched event if validation fails. If set to `true`, invalid enriched events will be emitted, as before. |
| `featureFlags.legacyEnrichmentOrder` | Optional. Default: `false`. In early versions of `enrich-kinesis` and `enrich-pubsub` (>= *3.1.5*), the Javascript enrichment incorrectly ran before the currency, weather, and IP Lookups enrichments. Set this flag to true to keep the erroneous behavior of those previous versions. |
| `validation.atomicFieldsLimits` (since *4.0.0*) | Optional. For the defaults, see [here](https://github.com/snowplow/enrich/blob/master/modules/common/src/main/resources/reference.conf). Configuration for custom maximum atomic fields (strings) length. It's a map-like structure with keys being atomic field names and values being their max allowed length. |

Instead of a message queue, it's also possible to read collector payloads from files on disk. This can be used for instance for testing purposes. In this case the configuration needs to be as below.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,3 +328,18 @@ function process(event, params, headers) {
}
}
```

## Erasing derived contexts

Starting with Enrich 5.4.0, it is possible to erase derived contexts.

It can be used to update existing derived contexts as well. The way to do that is shown in the below example:

```js
function process(event) {
const derived = JSON.parse(event.getDerived_contexts());
event.eraseDerived_contexts();
derived.data[0].data.deviceBrand = "test1";
return derived.data;
}
```
3 changes: 1 addition & 2 deletions src/componentVersions.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ export const versions = {

// Core pipeline
collector: '3.3.0',
enrich: '5.3.0',
collector: '3.4.0',
enrich: '5.3.0',
enrich: '5.4.0',
sqs2kinesis: '1.0.4',
dataflowRunner: '0.7.5',
snowbridge: '3.1.1',
Expand Down