Skip to content

Commit

Permalink
Use short _schema_version field from analytics-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
pondzix committed Jan 10, 2024
1 parent 097e987 commit a84bf93
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ class SkippingSchemasSpec extends Specification {
NamedValue(name = "unstruct_event_com_example_my_schema_1", value = json"""{"field": "ue1"}"""),
NamedValue(
name = "contexts_com_example_my_schema_2",
value = json"""[{"_schema_version" : "iglu:com.example/mySchema/jsonschema/2-0-0", "field": "c1"}]"""
value = json"""[{"_schema_version" : "2-0-0", "field": "c1"}]"""
),
NamedValue(
name = "contexts_com_example_my_schema_3",
value = json"""[{"_schema_version" : "iglu:com.example/mySchema/jsonschema/3-0-0", "field": "dc1"}]"""
value = json"""[{"_schema_version" : "3-0-0", "field": "dc1"}]"""
)
)
)
Expand All @@ -72,11 +72,11 @@ class SkippingSchemasSpec extends Specification {
NamedValue(name = "unstruct_event_com_example_my_schema_1", value = json"""{"field": "ue1"}"""),
NamedValue(
name = "contexts_com_example_my_schema_2",
value = json"""[{"_schema_version" : "iglu:com.example/mySchema/jsonschema/2-0-0", "field": "c1"}]"""
value = json"""[{"_schema_version" : "2-0-0", "field": "c1"}]"""
),
NamedValue(
name = "contexts_com_example_my_schema_3",
value = json"""[{"_schema_version" : "iglu:com.example/mySchema/jsonschema/3-0-0", "field": "dc1"}]"""
value = json"""[{"_schema_version" : "3-0-0", "field": "dc1"}]"""
)
)
)
Expand Down Expand Up @@ -117,11 +117,11 @@ class SkippingSchemasSpec extends Specification {
shouldExist = List(
NamedValue(
name = "contexts_com_example_my_schema_2",
value = json"""[{"_schema_version" : "iglu:com.example/mySchema/jsonschema/2-0-0", "field": "c1"}]"""
value = json"""[{"_schema_version" : "2-0-0", "field": "c1"}]"""
),
NamedValue(
name = "contexts_com_example_my_schema_3",
value = json"""[{"_schema_version" : "iglu:com.example/mySchema/jsonschema/3-0-0", "field": "dc1"}]"""
value = json"""[{"_schema_version" : "3-0-0", "field": "dc1"}]"""
)
)
)
Expand All @@ -147,11 +147,11 @@ class SkippingSchemasSpec extends Specification {
// There is still '_2' column because 2-0-0 is skipped, but 2-1-0 with c2 value is not
NamedValue(
name = "contexts_com_example_my_schema_2",
value = json"""[{"_schema_version" : "iglu:com.example/mySchema/jsonschema/2-1-0", "field": "c2"}]"""
value = json"""[{"_schema_version" : "2-1-0", "field": "c2"}]"""
),
NamedValue(
name = "contexts_com_example_my_schema_3",
value = json"""[{"_schema_version" : "iglu:com.example/mySchema/jsonschema/3-0-0", "field": "dc1"}]"""
value = json"""[{"_schema_version" : "3-0-0", "field": "dc1"}]"""
)
)
)
Expand All @@ -177,8 +177,8 @@ class SkippingSchemasSpec extends Specification {
NamedValue(name = "unstruct_event_com_example_my_schema_1", value = json"""{"field": "ue1"}"""),
NamedValue(
name = "contexts_com_example_my_schema_2",
value = json"""[{"_schema_version" : "iglu:com.example/mySchema/jsonschema/2-0-0", "field": "c1"},
{"_schema_version" : "iglu:com.example/mySchema/jsonschema/2-1-0", "field": "c2"}]"""
value = json"""[{"_schema_version" : "2-0-0", "field": "c1"},
{"_schema_version" : "2-1-0", "field": "c2"}]"""
)
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class TransformSpec extends Specification {
name = "contexts_com_example_my_schema_7",
value = json"""
[{
"_schema_version" : "iglu:com.example/mySchema/jsonschema/7-0-1",
"_schema_version" : "7-0-1",
"my_string": "abc",
"my_int": 42
}]
Expand All @@ -188,7 +188,7 @@ class TransformSpec extends Specification {
name = "contexts_com_example_my_schema_8",
value = json"""
[{
"_schema_version" : "iglu:com.example/mySchema/jsonschema/8-0-1",
"_schema_version" : "8-0-1",
"my_string": "xyz",
"my_int": 123
}]
Expand Down Expand Up @@ -237,12 +237,12 @@ class TransformSpec extends Specification {
name = "contexts_com_example_my_schema_7",
value = json"""
[{
"_schema_version" : "iglu:com.example/mySchema/jsonschema/7-0-1",
"_schema_version" : "7-0-1",
"my_string": "abc",
"my_int": 42
},
{
"_schema_version" : "iglu:com.example/mySchema/jsonschema/7-0-2",
"_schema_version" : "7-0-2",
"my_string": "xyz",
"my_int": 123
}]
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ object Dependencies {
val badrows = "2.3.0"
val igluClient = "3.1.0"
val tracker = "2.0.0"
val analyticsSdk = "3.2.0"
val analyticsSdk = "3.2.1"

// Transitive overrides
val snappy = "1.1.10.2"
Expand Down

0 comments on commit a84bf93

Please sign in to comment.