Skip to content

Commit 093d67b

Browse files
Update bundle version to 11.94.2 and add RUNE_JSON ingest sample (#438)
* Add RUNE_JSON Ingest sample - Add RUNE_JSON Ingest sample * Add more order samples for RUNEJSON ingest * Update bundle version * Update bundle version * Add metadata scheme address and location examples --------- Co-authored-by: Najihah Amran <najihah.amran@regnosys.com>
1 parent 4d73494 commit 093d67b

16 files changed

+350
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<java.enforced.version>[21,22)</java.enforced.version>
2020

2121
<rosetta.dsl.version>9.70.0</rosetta.dsl.version>
22-
<rosetta.bundle.version>11.93.0</rosetta.bundle.version>
22+
<rosetta.bundle.version>11.94.2</rosetta.bundle.version>
2323

2424
<xtext.version>2.38.0</xtext.version>
2525
<guava.version>33.3.1-jre</guava.version>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"id" : "pipeline-translate-order",
3+
"name" : "Order",
4+
"transform" : {
5+
"type" : "TRANSLATE",
6+
"function" : "demo.rune.json.ingestion.functions.Ingest_Order",
7+
"inputType" : "demo.rune.json.ingestion.Order",
8+
"outputType" : "demo.rune.json.ingestion.IngestedOrder"
9+
},
10+
"inputSerialisation" : {
11+
"format" : "RUNE_JSON"
12+
},
13+
"outputSerialisation" : {
14+
"format" : "JSON"
15+
}
16+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"id" : "test-pack-translate-order-orders",
3+
"pipelineId" : "pipeline-translate-order",
4+
"name" : "Orders",
5+
"samples" : [ {
6+
"id" : "pencil-order",
7+
"name" : "Pencil Order",
8+
"inputPath" : "ingest/input/orders/pencil-order.json",
9+
"outputPath" : "ingest/output/order/orders/pencil-order.json",
10+
"assertions" : {
11+
"inputPathCount" : 0,
12+
"outputPathCount" : 0,
13+
"modelValidationFailures" : 0,
14+
"schemaValidationFailure" : false,
15+
"runtimeError" : false
16+
}
17+
}, {
18+
"id" : "keyboard-order",
19+
"name" : "Keyboard Order",
20+
"inputPath" : "ingest/input/orders/keyboard-order.json",
21+
"outputPath" : "ingest/output/order/orders/keyboard-order.json",
22+
"assertions" : {
23+
"inputPathCount" : 0,
24+
"outputPathCount" : 0,
25+
"modelValidationFailures" : 0,
26+
"schemaValidationFailure" : false,
27+
"runtimeError" : false
28+
}
29+
}, {
30+
"id" : "wireless-mouse-order",
31+
"name" : "Wireless Mouse Order",
32+
"inputPath" : "ingest/input/orders/wireless-mouse-order.json",
33+
"outputPath" : "ingest/output/order/orders/wireless-mouse-order.json",
34+
"assertions" : {
35+
"inputPathCount" : 0,
36+
"outputPathCount" : 0,
37+
"modelValidationFailures" : 0,
38+
"schemaValidationFailure" : false,
39+
"runtimeError" : false
40+
}
41+
}, {
42+
"id" : "notebook-order",
43+
"name" : "Notebook Order",
44+
"inputPath" : "ingest/input/orders/notebook-order.json",
45+
"outputPath" : "ingest/output/order/orders/notebook-order.json",
46+
"assertions" : {
47+
"inputPathCount" : 0,
48+
"outputPathCount" : 0,
49+
"modelValidationFailures" : 0,
50+
"schemaValidationFailure" : false,
51+
"runtimeError" : false
52+
}
53+
}, {
54+
"id" : "headphone-order",
55+
"name" : "Headphone Order",
56+
"inputPath" : "ingest/input/orders/headphone-order.json",
57+
"outputPath" : "ingest/output/order/orders/headphone-order.json",
58+
"assertions" : {
59+
"inputPathCount" : 0,
60+
"outputPathCount" : 0,
61+
"modelValidationFailures" : 0,
62+
"schemaValidationFailure" : false,
63+
"runtimeError" : false
64+
}
65+
} ]
66+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"@model" : "demo",
3+
"@type" : "demo.rune.json.ingestion.Order",
4+
"@version" : "${project.version}",
5+
"identifier" : {
6+
"@data" : "order_id_5"
7+
},
8+
"orderItem" : {
9+
"@key:external" : "headphoneKey",
10+
"name" : "Wireless Headphone",
11+
"quantity" : 7,
12+
"price" : 119.79,
13+
"currency" : "GBP"
14+
},
15+
"itemRef" : {
16+
"@ref:scoped" : "headphoneKey"
17+
},
18+
"customer" : {
19+
"userId" : {
20+
"@scheme": "https://www.example.com/scheme1",
21+
"@data": "user_id_1"
22+
},
23+
"fullName" : "John Doe",
24+
"address" : {
25+
"@key:scoped" : "user1_location",
26+
"@data" : "123 Jane Street"
27+
}
28+
},
29+
"toAddress" : {
30+
"@ref:scoped" : "user1_location"
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"@model" : "demo",
3+
"@type" : "demo.rune.json.ingestion.Order",
4+
"@version" : "${project.version}",
5+
"identifier" : {
6+
"@data" : "order_id_2"
7+
},
8+
"orderItem" : {
9+
"@key:external" : "keyboardKey",
10+
"name" : "Keyboard",
11+
"quantity" : 1,
12+
"price" : 68.99,
13+
"currency" : "EUR"
14+
},
15+
"itemRef" : {
16+
"@ref:scoped" : "keyboardKey"
17+
},
18+
"customer" : {
19+
"userId" : {
20+
"@scheme" : "https://www.example.com/scheme1",
21+
"@data" : "user_id_1"
22+
},
23+
"fullName" : "John Doe",
24+
"address" : {
25+
"@key:scoped" : "user1_location",
26+
"@data" : "123 Jane Street"
27+
}
28+
},
29+
"toAddress" : {
30+
"@ref:scoped" : "user1_location"
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"@model" : "demo",
3+
"@type" : "demo.rune.json.ingestion.Order",
4+
"@version" : "${project.version}",
5+
"identifier" : {
6+
"@data" : "order_id_4"
7+
},
8+
"orderItem" : {
9+
"@key:external" : "notebookKey",
10+
"name" : "A4 Notebook",
11+
"quantity" : 11,
12+
"price" : 2.99,
13+
"currency" : "GBP"
14+
},
15+
"itemRef" : {
16+
"@ref:scoped" : "notebookKey"
17+
},
18+
"customer" : {
19+
"userId" : {
20+
"@scheme" : "https://www.example.com/scheme1",
21+
"@data" : "user_id_1"
22+
},
23+
"fullName" : "John Doe",
24+
"address" : {
25+
"@key:scoped" : "user1_location",
26+
"@data" : "123 Jane Street"
27+
}
28+
},
29+
"toAddress" : {
30+
"@ref:scoped" : "user1_location"
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"@model" : "demo",
3+
"@type" : "demo.rune.json.ingestion.Order",
4+
"@version" : "${project.version}",
5+
"identifier" : {
6+
"@data" : "order_id_1"
7+
},
8+
"orderItem" : {
9+
"@key:external" : "pencilKey",
10+
"name" : "Pencil",
11+
"quantity" : 5,
12+
"price" : 0.50,
13+
"currency" : "GBP"
14+
},
15+
"itemRef" : {
16+
"@ref:scoped" : "pencilKey"
17+
},
18+
"customer" : {
19+
"userId" : {
20+
"@scheme" : "https://www.example.com/scheme1",
21+
"@data" : "user_id_1"
22+
},
23+
"fullName" : "John Doe",
24+
"address" : {
25+
"@key:scoped" : "user1_location",
26+
"@data" : "123 Jane Street"
27+
}
28+
},
29+
"toAddress" : {
30+
"@ref:scoped" : "user1_location"
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"@model" : "demo",
3+
"@type" : "demo.rune.json.ingestion.Order",
4+
"@version" : "${project.version}",
5+
"identifier" : {
6+
"@data" : "order_id_3"
7+
},
8+
"orderItem" : {
9+
"@key:external" : "mouseKey",
10+
"name" : "Wireless Mouse",
11+
"quantity" : 2,
12+
"price" : 59.89,
13+
"currency" : "GBP"
14+
},
15+
"itemRef" : {
16+
"@ref:scoped" : "mouseKey"
17+
},
18+
"customer" : {
19+
"userId" : {
20+
"@scheme" : "https://www.example.com/scheme1",
21+
"@data" : "user_id_1"
22+
},
23+
"fullName" : "John Doe",
24+
"address" : {
25+
"@key:scoped" : "user1_location",
26+
"@data" : "123 Jane Street"
27+
}
28+
},
29+
"toAddress" : {
30+
"@ref:scoped" : "user1_location"
31+
}
32+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"identifier" : "user_id_1_order_id_5",
3+
"itemName" : "Wireless Headphone",
4+
"currency" : "GBP",
5+
"quantity" : 7,
6+
"amount" : 838.53,
7+
"amountWithVat" : 964.3095,
8+
"addressLabel" : "John Doe, 123 Jane Street"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"identifier" : "user_id_1_order_id_2",
3+
"itemName" : "Keyboard",
4+
"currency" : "EUR",
5+
"quantity" : 1,
6+
"amount" : 68.99,
7+
"amountWithVat" : 79.3385,
8+
"addressLabel" : "John Doe, 123 Jane Street"
9+
}

0 commit comments

Comments
 (0)