-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance grammar to support attribute mapping from sources to target
- Provide mapping grammar for source objects, joins and target mapping - Add new element creation for mappings in toolbar and context menu - Adapt custom serializer for new attributes - Add example for mapping Refactorings: - Split grammar into multiple files - Replace id and id references with unquoted text - Fix auto completion in text files through completion lexer and parser - Enhance auto-completion for string, number, and boolean
- Loading branch information
1 parent
9d084d1
commit 43c0d44
Showing
50 changed files
with
2,286 additions
and
652 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
examples/mapping-example/ExampleCRM/diagrams/CRM.diagram.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diagram: | ||
id: CRM | ||
name: "CRM" | ||
description: "Shows the complete CRM" | ||
nodes: | ||
- id: CustomerNode | ||
entity: Customer | ||
x: 325.5893891316664 | ||
y: 261.8195919791379 | ||
width: 122.22364807128906 | ||
height: 151 | ||
- id: OrderNode | ||
entity: Order | ||
x: 649.4416344093675 | ||
y: 274.85224527770106 | ||
width: 139.6079559326172 | ||
height: 132 | ||
edges: | ||
- id: CustomerToOrder | ||
relationship: Order_Customer | ||
sourceNode: CustomerNode | ||
targetNode: OrderNode |
13 changes: 13 additions & 0 deletions
13
examples/mapping-example/ExampleCRM/entities/Address.entity.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
entity: | ||
id: Address | ||
name: "Address" | ||
attributes: | ||
- id: CustomerID | ||
name: "CustomerID" | ||
datatype: "Integer" | ||
- id: Street | ||
name: "Street" | ||
datatype: "Varchar" | ||
- id: CountryCode | ||
name: "CountryCode" | ||
datatype: "Varchar" |
22 changes: 22 additions & 0 deletions
22
examples/mapping-example/ExampleCRM/entities/Customer.entity.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
entity: | ||
id: Customer | ||
name: "Customer" | ||
attributes: | ||
- id: Id | ||
name: "Id" | ||
datatype: "Integer" | ||
- id: FirstName | ||
name: "FirstName" | ||
datatype: "Varchar" | ||
- id: LastName | ||
name: "LastName" | ||
datatype: "Varchar" | ||
- id: City | ||
name: "City" | ||
datatype: "Varchar" | ||
- id: Country | ||
name: "Country" | ||
datatype: "Varchar" | ||
- id: Phone | ||
name: "Phone" | ||
datatype: "Varchar" |
20 changes: 20 additions & 0 deletions
20
examples/mapping-example/ExampleCRM/entities/Order.entity.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
entity: | ||
id: Order | ||
name: "Order" | ||
description: "Order placed by a customer in the Customer table." | ||
attributes: | ||
- id: Id | ||
name: "Id" | ||
datatype: "Integer" | ||
- id: OrderDate | ||
name: "OrderDate" | ||
datatype: "Integer" | ||
- id: OrderNumber | ||
name: "OrderNumber" | ||
datatype: "Varchar" | ||
- id: CustomerId | ||
name: "CustomerId" | ||
datatype: "Integer" | ||
- id: TotalAmount | ||
name: "TotalAmount" | ||
datatype: "Float" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "ExampleCRM", | ||
"version": "1.0.0" | ||
} |
5 changes: 5 additions & 0 deletions
5
examples/mapping-example/ExampleCRM/relationships/Order_Customer.relationship.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
relationship: | ||
id: Order_Customer | ||
parent: Customer | ||
child: Order | ||
type: '1:1' |
16 changes: 16 additions & 0 deletions
16
examples/mapping-example/ExampleDWH/CompleteCustomer.entity.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
entity: | ||
id: CompleteCustomer | ||
name: "CompleteCustomer" | ||
attributes: | ||
- id: Name | ||
name: "Name" | ||
datatype: "Varchar" | ||
- id: Country | ||
name: "Country" | ||
datatype: "Varchar" | ||
- id: FixedNumber | ||
name: "FixedNumber" | ||
datatype: "Integer" | ||
- id: FixedString | ||
name: "FixedString" | ||
datatype: "Varchar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
mapping: | ||
id: CompleteCustomer_Example | ||
sources: | ||
- id: Customer | ||
object: ExampleCRM.Customer | ||
join: from | ||
- id: Address | ||
object: ExampleCRM.Address | ||
join: left-join | ||
relations: | ||
- source: Customer | ||
conditions: | ||
- join: Address.CustomerID = Customer.Id | ||
- id: Country | ||
object: ExampleMasterdata.Country | ||
join: left-join | ||
relations: | ||
- source: Address | ||
conditions: | ||
- join: Country.Code = Address.CountryCode | ||
target: | ||
entity: CompleteCustomer | ||
attributes: | ||
- attribute: Name | ||
source: Customer.LastName | ||
- attribute: Country | ||
source: Country.Code | ||
- attribute: FixedNumber | ||
source: 1337 | ||
- attribute: FixedString | ||
source: "Fixed String" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "ExampleDWH", | ||
"version": "1.0.0" , | ||
"dependencies": { | ||
"ExampleCRM": "1.0.0", | ||
"ExampleMasterdata": "1.0.0" | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
examples/mapping-example/ExampleMasterdata/Country.entity.cm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
entity: | ||
id: Country | ||
name: "Country" | ||
attributes: | ||
- id: Code | ||
name: "Code" | ||
datatype: "Varchar" | ||
- id: Name | ||
name: "name" | ||
datatype: "Varchar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "ExampleMasterdata", | ||
"version": "1.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.