Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redshift: fix object types with empty properties getting ignored #104

Open
chuwy opened this issue Sep 2, 2021 · 1 comment
Open

Redshift: fix object types with empty properties getting ignored #104

chuwy opened this issue Sep 2, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@chuwy
Copy link
Contributor

chuwy commented Sep 2, 2021

If we process following schema with igluctl static generate:

{
  "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
  "self": {
    "vendor": "com.acme",
    "name": "site_search",
    "format": "jsonschema",
    "version": "1-0-0"
  },
  "description": "Schema for search interaction events with filters as arrays",
  "properties": {
    "filters": {
      "description": "Active site search filters",
      "type": [ "object", "null" ],
      "properties": {},
      "additionalProperties": true
    },
    "sorting": {
      "description": "Active site search sorting",
      "type": [ "object", "null" ],
      "properties": {},
      "additionalProperties": true
    }
  },
  "additionalProperties": false,
  "type": "object"
}

In resulting DDL there will be no filters nor sorting columns. If we remove properties from both fields - they're getting added.

@chuwy
Copy link
Contributor Author

chuwy commented Sep 19, 2021

As mentioned in snowplow/iglu-central#1137 the behavior is different if we have additionalProperties with object in it, but I belive the root of the bug is the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant