snowplow / iglu-central

Contains all JSON Schemas, Avros and Thrifts for Iglu Central
http://iglucentral.com
Apache License 2.0
118 stars 114 forks source link

Redshift JSON Path: patch com.apple/notification_events/jsonschema/1-0-0 #1005

Open maximillianus opened 5 years ago

maximillianus commented 5 years ago

I got an error while loading data from com.apple.notification_events context to redshift.

Apparently my userInfo field is an empty object while the SQL definition for this table says that notification.user_info.aps.alert.body and notification.user_info.aps.alert.title have NOT NULL property.

In the jsonschema, there is no such not null validation for both user info aps and alert.

Would like to know which one to follow: jsonschema or the sql definition?

maximillianus commented 4 years ago

Hi can I have someone to reply on this?

Thank you.

chuwy commented 4 years ago

Hi @maximillianus, sorry for delay. You're right this was a bug in old igluctl that generated the DDL and JSONPath. Those properties should not be required. In other words, JSON Schema is okay, DDL is broken. You can generate valid DDL with our latest igluctl.