snowplow-incubator / common-streams

Other
1 stars 0 forks source link

Transform atomic events for unstructed destinations #5

Closed istreeter closed 1 year ago

istreeter commented 1 year ago

The lib already had a transformEvent function, which transforms a Snowplow event ready to be loaded to a destination. The old function used Iglu client to guide the transformation of self-describing jsons into structured entities.

But for some destinations (Snowflake!) we do not want the self-describing jsons to be coerced into structured entities. But we still need to transform the other atomic fields into types which can be inserted to the destination.

This PR adds a transformEventUnstructured which transforms the atomic event into structured types, but without using Iglu when transforming SDJs.