Read on below the jump for:
Snowplow’s enrichment process outputs enriched events in a TSV format. This TSV currently has 131 fields, some of which are complex heterogeneous self-describing JSON, which can make it difficult to work with directly.
The Snowplow .NET Analytics SDK currently supports one transformation: the JSON Event Transformer, for turning this TSV into a more tractable JSON. Let’s check this out next.
The JSON Event Transformer uses the exact same algorithm as that found in the Snowplow Scala Analytics SDK. Here is an excerpt from a generated JSON:
The most complex piece of processing is the handling of the self-describing JSONs found in the enriched event’s
derived_contexts fields. All self-describing JSONs found in the event are flattened into top-level plain (i.e. not self-describing) objects within the enriched event JSON.
For example, if an enriched event contained a
com.snowplowanalytics.snowplow/link_click/jsonschema/1-0-1, then the final JSON would contain:
The Snowplow .NET Analytics is published to NuGet, the .NET package manager. To add it to your project, install it in the Visual Studio Package Manager Console like so:
For more information on installation check out the .NET Analytics SDK setup guide.
Use the SDK like this:
If there are any problems in the input TSV (such as unparseable JSON fields or numeric fields), the
transform method will throw a
SnowplowEventTransformationException. This exception contains a list of error messages - one for every problematic field in the input.
For more information, please check out the .NET Analytics SDK technical documentation.
If you have any questions or run into any problems, please raise an issue or get in touch with us through the usual channels.
And if there’s another Snowplow Analytics SDK you’d like us to prioritize creating, please let us know on our Discourse!