-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add yaml v1 #15
base: main
Are you sure you want to change the base?
Add yaml v1 #15
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
# LPG YAML Schema Options - examples | ||
|
||
# Version 1 - simple | ||
--- | ||
Nodes: | ||
Person: | ||
- id: STRING | ||
- first_name: STRING | ||
- last_name: STRING | ||
- years_of_age: INT | ||
- date_of_birth: DATETIME | ||
Address: | ||
- id: STRING | ||
- address_line_1: STRING | ||
- address_line_2: STRING | ||
- city: STRING | ||
- post_code: STRING | ||
EDGES: | ||
LIVES_AT: | ||
- directed: BOOLEAN | ||
- multiedge: BOOLEAN | ||
- from_node_type: Person | ||
- to_node_type: Address | ||
- start_date: DATETIME | ||
- end_date: DATETIME | ||
WORKS_AT: | ||
- directed: BOOLEAN | ||
- multiedge: BOOLEAN | ||
- from_node_type: Person | ||
- to_node_type: Address | ||
- start_date: DATETIME | ||
- end_date: DATETIME | ||
... | ||
|
||
# Version 2 - extensible | ||
--- | ||
Nodes: | ||
Person: | ||
attributes: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How to add "label aliases" (under Person or |
||
- id: | ||
type: STRING | ||
mandatory: BOOLEAN | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
- first_name: | ||
type: STRING | ||
mandatory: BOOLEAN | ||
indexed: BOOLEAN | ||
default: STRING | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the type of the default value? |
||
- last_name: | ||
type: STRING | ||
mandatory: BOOLEAN | ||
indexed: BOOLEAN | ||
default: STRING | ||
- years_of_age: | ||
type: INT | ||
mandatory: BOOLEAN | ||
indexed: BOOLEAN | ||
default: STRING | ||
- date_of_birth: | ||
type: DATETIME | ||
mandatory: BOOLEAN | ||
indexed: BOOLEAN | ||
default: STRING | ||
extension: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be anything, such as information about the information or metadata about the label node. |
||
- count: INT | ||
- filling_factor: FLOAT | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. N/A |
||
Address: | ||
attributes: | ||
- id: | ||
type: STRING | ||
mandatory: BOOLEAN | ||
indexed: BOOLEAN | ||
default: STRING | ||
- address_line_1: | ||
type: STRING | ||
mandatory: BOOLEAN | ||
indexed: BOOLEAN | ||
default: STRING | ||
- address_line_2: | ||
type: STRING | ||
mandatory: BOOLEAN | ||
indexed: BOOLEAN | ||
default: STRING | ||
- city: | ||
type: STRING | ||
mandatory: BOOLEAN | ||
indexed: BOOLEAN | ||
default: STRING | ||
- post_code: | ||
type: STRING | ||
mandatory: BOOLEAN | ||
indexed: BOOLEAN | ||
default: STRING | ||
extension: | ||
- count: INT | ||
- filling_factor: FLOAT | ||
EDGES: | ||
LIVES_AT: | ||
properties: | ||
- directed: BOOLEAN | ||
- multiedge: BOOLEAN | ||
- from_node_type: Person | ||
- to_node_type: Address | ||
attributes: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "properties are the properties of the edge type"
|
||
- start_date: | ||
type: DATETIME | ||
mandatory: BOOLEAN | ||
- end_date: | ||
type: DATETIME | ||
mandatory: BOOLEAN | ||
extension: | ||
- count: INT | ||
- filling_factor: FLOAT | ||
WORKS_AT: | ||
properties: | ||
- directed: BOOLEAN | ||
- multiedge: BOOLEAN | ||
- from_node_type: Person | ||
- to_node_type: Address | ||
attributes: | ||
- start_date: | ||
type: DATETIME | ||
mandatory: BOOLEAN | ||
- end_date: | ||
type: DATETIME | ||
mandatory: BOOLEAN | ||
extension: | ||
- count: INT | ||
- filling_factor: FLOAT | ||
... |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
# LPG YAML Schema Options | ||
|
||
# See "examples" folder for examples of the simple and extensible versions | ||
|
||
# Version 1 - simple | ||
# PROS: | ||
# - Simple | ||
# - Very human readable | ||
# CONS: | ||
# - Not extensible | ||
|
||
--- | ||
Nodes: # Reserved | ||
LabelOne: | ||
- id: STRING # Reserved | ||
- attribute_1: <TYPE> | ||
- attribute_2: <TYPE> | ||
- attribute_3: <TYPE> | ||
LabelTwo: | ||
- id: STRING # Reserved | ||
- attribute_1: <TYPE> | ||
- attribute_2: <TYPE> | ||
- attribute_3: <TYPE> | ||
EDGES: # Reserved | ||
LABEL_THREE: | ||
- directed: BOOLEAN # Reserved | ||
- multiedge: BOOLEAN # Reserved | ||
- from_node_type: <NODE> # Reserved | ||
- to_node_type: <NODE> # Reserved | ||
- attribute_1: <TYPE> | ||
- attribute_2: <TYPE> | ||
LABEL_FOUR: | ||
- directed: BOOLEAN # Reserved | ||
- multiedge: BOOLEAN # Reserved | ||
- from_node_type: <NODE> # Reserved | ||
- to_node_type: <NODE> # Reserved | ||
- attribute_1: <TYPE> | ||
- attribute_2: <TYPE> | ||
... | ||
|
||
# Version 2 - extensible | ||
# PROS: | ||
# - Edge-type properties distinct from attributes | ||
# - Extensible | ||
# CONS: | ||
# - Extra levels of indenting / complexity | ||
# - Less human readable | ||
|
||
--- | ||
Nodes: # Reserved | ||
LabelOne: | ||
attributes: | ||
- id: # Reserved | ||
type: <TYPE> # Reserved | ||
extension_1: <TYPE> | ||
extension_2: <TYPE> | ||
- attribute_1: | ||
type: STRING # Reserved | ||
extension_1: <TYPE> | ||
extension_2: <TYPE> | ||
- attribute_2: | ||
type: STRING # Reserved | ||
extension_1: <TYPE> | ||
extension_2: <TYPE> | ||
extension: | ||
- extension_1: <TYPE> | ||
- extension_2: <TYPE> | ||
LabelTwo: | ||
attributes: | ||
- id: # Reserved | ||
type: <TYPE> # Reserved | ||
extension_1: <TYPE> | ||
extension_2: <TYPE> | ||
- attribute_1: | ||
type: STRING # Reserved | ||
extension_1: <TYPE> | ||
extension_2: <TYPE> | ||
- attribute_2: | ||
type: STRING # Reserved | ||
extension_1: <TYPE> | ||
extension_2: <TYPE> | ||
extension: | ||
- extension_1: <TYPE> | ||
- extension_2: <TYPE> | ||
EDGES: # Reserved | ||
LABEL_THREE: | ||
properties: # Reserved | ||
- directed: <TYPE> # Reserved | ||
- multiedge: <TYPE> # Reserved | ||
- from_node_type: <NODE> # Reserved | ||
- to_node_type: <NODE> # Reserved | ||
attributes: # Reserved | ||
- attribute_1: | ||
type: <TYPE> # Reserved | ||
extension_1: <TYPE> | ||
extension_2: <TYPE> | ||
- attribute_2: | ||
type: <TYPE> # Reserved | ||
extension_1: <TYPE> | ||
extension_2: <TYPE> | ||
extension: | ||
- extension_1: <TYPE> | ||
- extension_2: <TYPE> | ||
LABEL_FOUR: | ||
properties: # Reserved | ||
- directed: <TYPE> # Reserved | ||
- multiedge: <TYPE> # Reserved | ||
- from_node_type: <NODE> # Reserved | ||
- to_node_type: <NODE> # Reserved | ||
attributes: # Reserved | ||
- attribute_1: | ||
type: <TYPE> # Reserved | ||
extension_1: <TYPE> | ||
extension_2: <TYPE> | ||
- attribute_2: | ||
type: <TYPE> # Reserved | ||
extension_1: <TYPE> | ||
extension_2: <TYPE> | ||
extension: | ||
- extension_1: <TYPE> | ||
- extension_2: <TYPE> | ||
... | ||
|
||
# Open question(s) | ||
# 1. How best to represent single edge types that go between multiple node types? | ||
# e.g. Person KNOWS Person AND Person KNOWS Pet | ||
# i.e. KNOWS is the same edge type whether it's Person self-edge or Person to Pet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple version is for interoperability (sharing info between different domains, e.g., business and research)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
USA-CASE: Share the understanding as quickly as possible