Open rkorszun opened 2 years ago
Thanks for the very detailed report, @rkorszun! This is an issue in the underlying Schema DDL library: https://github.com/snowplow/schema-ddl/issues/55. Although we didn't even know it was working on 0.6.0 before.
Thanks for the info, I will try to look into schema-ddl
Problem description
For schemas containing properties with additionalProperties like this:
the jsoonpath will contain duplicated entries:
the same for generated SQL:
I expect that entries will be not duplicated as it is for example in iglu-central repository.
Steps to reproduce:
igluctl static generate
for https://github.com/snowplow/iglu-central/blob/master/schemas/com.snowplowanalytics.snowplow/site_search/jsonschema/1-0-0 schemaCREATE SCHEMA IF NOT EXISTS atomic;
CREATE TABLE IF NOT EXISTS atomic.com_snowplowanalytics_snowplow_site_search_1 ( "schema_vendor" VARCHAR(128) ENCODE ZSTD NOT NULL, "schema_name" VARCHAR(128) ENCODE ZSTD NOT NULL, "schema_format" VARCHAR(128) ENCODE ZSTD NOT NULL, "schema_version" VARCHAR(128) ENCODE ZSTD NOT NULL, "root_id" CHAR(36) ENCODE RAW NOT NULL, "root_tstamp" TIMESTAMP ENCODE ZSTD NOT NULL, "ref_root" VARCHAR(255) ENCODE ZSTD NOT NULL, "ref_tree" VARCHAR(1500) ENCODE ZSTD NOT NULL, "ref_parent" VARCHAR(255) ENCODE ZSTD NOT NULL, "terms" VARCHAR(65535) ENCODE ZSTD NOT NULL, "filters" VARCHAR(4096) ENCODE ZSTD, "filters" VARCHAR(4096) ENCODE ZSTD, "page_results" INT ENCODE ZSTD, "total_results" INT ENCODE ZSTD, FOREIGN KEY (root_id) REFERENCES atomic.events(event_id) ) DISTSTYLE KEY DISTKEY (root_id) SORTKEY (root_tstamp);
COMMENT ON TABLE atomic.com_snowplowanalytics_snowplow_site_search_1 IS 'iglu:com.snowplowanalytics.snowplow/site_search/jsonschema/1-0-0'; root@4a755f2db42b:/out/sql#