Data schema
Permission: Settings management
Data schema setting represents global common dictionary for analysts working on specific use case. It is used to set how to represent or format data from Neo4j database in GUI or to define globally used virtual properties. Every property defined in Data schema is "locked" in GUI which means that users without Settings management are not allowed to change the title of these properties or to change the formula in virtual properties.
Configuration
Left menu - settings
In panel "Settings list" use icon "Update" for setting "DATA_SCHEMA".
Enter JSON configuration and confirm by pressing "Save" button.
Default configuration
Default configuration contains no property definitions.
Left menu - settings
In panel "Settings list" use icon "Update" for setting "DATA_SCHEMA".
Press button "Default" and store by pressing button "Save".
Automatic configuration
Automatic configuration can be used to generate configuration automatically with some logic based on data of first 1000 nodes and first 1000 relationships in database. This automatically generated configuration can be used as a good starting point to create your own configuration.
Left menu - settings
In panel "Settings list" use icon "Update" for setting "DATA_SCHEMA".
Pres button "Automatic", wait for generator to generate JSON and store by pressing button "Save".
Description of configuration
Configuration is entered as JSON. Example of JSON:
{
"nodeProperties":{
"database":[
{
"property":"title",
"title":"Title",
"dataType":"text",
"dataRole":null,
"formatString":null,
"inputRestrictions":{
"mandatory":true,
"readOnly":false,
"strict":false,
"multiple":false,
"values":null,
"groups":null
}
},
{
"property":"type",
"title":"Type",
"dataType":"text",
"dataRole":"dimension",
"formatString":null,
"inputRestrictions":{
"mandatory":false,
"readOnly":false,
"strict":true,
"multiple":false,
"values":[
"TYPE 1.1",
"TYPE 1.2",
"TYPE 2.1",
"TYPE 2.2"
],
"groups":[
{
"label":"TYPE 1",
"values":[
"TYPE 1.1",
"TYPE 1.2"
]
},
{
"label":"TYPE 2",
"values":[
"TYPE 2.1",
"TYPE 2.2"
]
}
]
}
}
],
"virtual":[
{
"property":"title",
"title":"Title",
"dataType":"text",
"dataRole":null,
"formatString":null,
"formula":"return 'value';"
}
]
},
"relProperties":{
"database":[
{
"property":"type",
"title":"Type",
"dataType":"text",
"dataRole":"dimension",
"formatString":null,
"inputRestrictions":{
"mandatory":false,
"readOnly":false,
"strict":false,
"multiple":false,
"values":null,
"groups":null
}
},
{
"property":"subtype",
"title":"Subtype",
"dataType":"number",
"dataRole":"dimension",
"formatString":null,
"inputRestrictions":{
"mandatory":false,
"readOnly":false,
"strict":true,
"multiple":false,
"values":[
"TYPE 1.1",
"TYPE 1.2",
"TYPE 2.1",
"TYPE 2.2"
],
"groups":[
{
"label":"TYPE 1",
"values":[
"TYPE 1.1",
"TYPE 1.2"
]
},
{
"label":"TYPE 2",
"values":[
"TYPE 2.1",
"TYPE 2.2"
]
}
]
}
}
],
"virtual":[
{
"property":"title",
"title":"Title",
"dataType":"text",
"dataRole":null,
"formatString":null,
"formula":"return 'value';"
}
]
},
"mergedRelProperties":[
{
"property":"title",
"title":"Title",
"dataType":"text",
"dataRole":null,
"formatString":null,
"formula":"return edge.data.property_name;"
}
],
"dirMergedRelProperties":[
{
"property":"title",
"title":"Title",
"dataType":"text",
"dataRole":null,
"formatString":null,
"formula":"return edges.length;"
}
],
"nodePropertyGroups":[
{
"title":"Main",
"properties":[
{
"property":"title"
},
{
"property":"type"
}
]
}
]
}
Explanation of JSON properties:
Property |
Values |
Default |
Description |
Usage |
nodeProperties MANDATORY |
List of DPD and list of VPD |
Contains list of node Database Property Definitions (DPD) and node Virtual Property Definitions (VPD) used in GUI. |
Search page, Visualization |
|
nodeProperties.database |
Array of DPD objects |
List of node DB properties used in GUI. Every DB property is defined as a JSON Object called DPD (Database Property Definition). |
Search page, Visualization |
|
nodeProperties.virtual |
Array of VPD objects |
List of node virtual properties used in GUI. Every virtual property is defined as a JSON Object called VPD (Virtual Property Definition). |
Visualization |
|
relProperties MANDATORY |
List of DPD and list of VPD |
Contains list of relationship Database Property Definitions (DPD) and relationship Virtual Property Definitions (VPD) used in GUI. |
Search page, Visualization |
|
relProperties.database |
Array of DPD objects |
List of relationship DB properties used in GUI. Every DB property is defined as a JSON Object called DPD (Database Property Definition). |
Search page, Visualization |
|
relProperties.virtual |
Array of VPD objects |
List of relationship virtual properties used in GUI. Every virtual property is defined as a JSON Object called VPD (Virtual Property Definition). |
Visualization |
|
mergedRelProperties MANDATORY |
Array of VPD objects |
List of merged relationship virtual properties used in GUI. Every virtual property is defined as a JSON Object called VPD (Virtual Property Definition). |
Visualization |
|
dirMergedRelProperties MANDATORY |
Array of VPD objects |
List of direction merged relationship virtual properties used in GUI. Every virtual property is defined as a JSON Object called VPD (Virtual Property Definition). |
Visualization |
|
VPD.property MANDATORY |
String |
Technical name of virtual property which is defined by this VPD. |
Visualization |
|
VPD.title |
String |
VPD.property |
Property title used in GUI. You can define custom title for every property. This is useful when you want to use user friendly and formated names in GUI instead of technical names of properties. When not defined or set to null then the value of VPD.property is used. |
Visualization |
VPD.formula |
String |
Body of a javascript function used to calculate the value of this virtual property (be sure to escape special characters like new line or tab). |
Visualization |
|
VPD.dataType |
undefined, null, "text", "number", "url" |
null |
Type of formatting for values in GUI of this virtual property.
|
Visualization |
VPD.formatString |
Numeral.js format string |
"0.00" |
If dataType is set to "number" then for formatString is used with the Numeral.js library to format numbers in GUI. Note: language dependent formating is set according to user locale set in user profile. |
Visualization |
VPD.dataRole |
undefined, null, "dimension", "metric" |
null |
Defines how to use virtual property in GUI.
|
Visualization |
DPD.property MANDATORY |
String |
Technical name of DB property which is defined by this DPD. Value is used for referencing purposes, e.g. in Style mappers. |
Search page, Visualization |
|
DPD.title |
String |
DPD.property |
Property title used in GUI. You can define custom title for every property. This is useful when you want to use user friendly and formated names in GUI instead of DB model names of properties. When not defined or set to null then the DB name of property is used (DPD.property). |
Search page, Visualization |
DPD.dataType |
undefined, null, "text", "number", "url" |
null |
Type of formatting for values in GUI of this DB property.
|
Search page, Visualization |
DPD.formatString |
Numeral.js format string |
"0.00" |
If dataType is set to "number" then for formatString is used with the Numeral.js library to format numbers in GUI. Note: language dependent formating is set according to user locale set in user profile. |
Search page, Visualization |
DPD.dataRole |
undefined, null, "dimension", "metric" |
null |
Defines how to use DB property in GUI.
|
Visualization filters |
DPD.inputRestrictions |
Object |
Defines restrictions for input field in create and update forms. See Input Restrictions for all types of input fields that can be created with this setting. |
Create and Update forms |
|
DPD.inputRestrictions.mandatory |
true, false |
false |
If set to true then it's mandatory to enter some value in create and update forms (user can't save the change without any value entered for this property). |
Create and Update forms |
DPD.inputRestrictions.readOnly |
true, false |
false |
If set to true then the value of this property is read-only in create and update forms. |
Create and Update forms |
DPD.inputRestrictions.strict |
true, false |
false |
If strict is set to true then user can choose only values defined in values or groups when editing DB data via create or update form.
The strict values functionality is available only if dataType is set to "text" and dataRole to "dimension". |
Create and Update forms |
DPD.inputRestrictions.multiple |
true, false |
false |
If multiple is set to true then user can choose multiple values (defined in values or groups ) as a property value when editing DB data via create or update form. These values are then stored as plain text separated with commas in DB property. The multiple values functionality is available only if dataType is set to "text" and dataRole to "dimension". |
Create and Update forms |
DPD.inputRestrictions.values |
Array of plain values |
Values used in combo box (available only if dataType is set to "text", dataRole is set to "dimension" and strict is set to false). |
Create and Update forms |
|
DPD.inputRestrictions.groups |
Array of GDO objects |
Values used in combo box divided into groups for better user orientation (available only if dataType is set to "text", dataRole is set to "dimension" and strict is set to true). Every group is defined by GDO (Group Definition Object). |
Create and Update forms |
|
GDO.title MANDATORY |
String |
Title of group of values shown in combo box in create and update forms. |
Create and Update forms |
|
GDO.values MANDATORY |
Array of plain values |
Values used in this specific group in combo box in create and update forms. |
Create and Update forms |
|
nodePropertyGroups |
Array of NTDO objects |
Set how to group node properties to tabs in view, create and update forms. Every tab is defined by NTDO (Node Tab Definition Object). |
Create and Update forms |
|
NTDO.title MANDATORY |
String |
Label (or title) of the group used as tab label in view, create and update forms. |
Create and Update forms |
|
NTDO.properties MANDATORY |
Array of objects |
Referenced DB properties used in this tab. Every reference is done with simple object which has only one property property where the value is name of referenced DB property. For example: {"property":"type"} |
Create and Update forms |