Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore original schema-ddl behaviour for objects with no defined fields
This concerns schemas like: ``` {"type": "object", "additionalProperties": false} ``` Older versions of schema-ddl would convert this to a schema type to String (JSON) parquet column. In snowplow/schema-ddl#205 we changed the behaviour so this schema is converted to a `None`, i.e. do not create a column for this schema. It was a good change for newer loaders (aside from RDB Loader). But that caused problems for RDB Loader under an edge-case scenario: If the schema above is evolved from `1-0-0` to `1-0-1` and the new schema adds a field to the schema, then RDB Loader tries to create a column for the new field. But that clashes with the old string column created with the older version of RDB Loader. This PR returns to the original behaviour of schema-ddl for this schemas with no explicit properties. It does so without us making any change to schema-ddl, so we still get all the benefits of snowplow/schema-ddl#205 for the other loaders.
- Loading branch information