Snowplow custom unstructured events


#1

Can i have my custom unstructured events schema with nested properties?
If yes then how can i use them in snowplow?


#2

Hi @ghartaan,

Sure you can. All nested properties can be flattened by Igluctl - there’s nothing specific you should do to use nested properties. For example, hypothetical my_event schema:

{
  "nested": {
    "type": "object",
    "properties": {
      "foo": {"type": "string"},
      "bar": {"type": "string"}
    }
}

will become following DDL:

CREATE TABLE atomic.my_event (
  nested.foo VARCHAR(4096)
  nested.bar VARCHAR(4096)
)

However, make sure that you’re not using nested arrays. Although nothing will be broken - their support in Redshift is quite limited as they will be also transformed into plain VARCHAR.