Section |
---|
Column |
---|
| You can define the data model either via GUI during the import or in more advanced way using the XML file. The XML definition is submitted to BellaDati's REST API or uploaded via GUI. Basic conceptXML definition can be applied to objects, the data model consists of: - dataset - dataset is a virtual cube consisting of attributes and indicators
- attributes - attribute is descriptor of indicator typically strings like ID, name, city etc.
- attribute members - represents the single value of the attribute - e.g. New York, London, Berlin for attribute City.
- indicators - is a data column containing computational data - prices, amounts etc.
|
|
XML configuration file structureAs described above, data model contains of data set definition including attributes and indicators. Each data set can be also connected to external data source. Following example illustrates how to do it: Code Block |
---|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:dataSet xmlns:ns2="http://www.belladati.com/api/v1.0" name="CRM - opportunities">
<indicators>
<indicator code="M_AMOUNT" name="Amount"/>
<indicator code="M_PROBABILITY" name="Probability"/>
</indicators>
<attributes>
<attribute code="L_CITY" name="City"/>
<attribute code="L_ID" name="Id"/>
<attribute code="L_NAME" name="Name"/>
<attribute code="L_OFFICE" name="Office"/>
<attribute code="L_PRODUCT" name="Product"/>
<attribute code="L_STATUS" name="Status"/>
</attributes>
<dataSources>
<dataSource name="SQL data source">
<sql dbType="MYSQL">
<columns>
<timeColumn localeString="cs" format="dd.MM.yyyy" index="0" name="Date"/>
<attributeColumn code="L_ID" index="1" name="Id"/>
<attributeColumn code="L_NAME" index="2" name="Name"/>
<attributeColumn code="L_OFFICE" index="3" name="Office"/>
<attributeColumn code="L_PRODUCT" index="4" name="Product"/>
<attributeColumn code="L_STATUS" index="5" name="Status"/>
<attributeColumn code="L_CITY" index="6" name="City"/>
<indicatorColumn code="M_AMOUNT" index="7" name="Amount"/>
<indicatorColumn code="M_PROBABILITY" index="8" name="Probability"/>
</columns>
<overridingTimeColumnDate>2010-12-17</overridingTimeColumnDate>
<properties>
<entry name="SQL" value="select * from crm_opportunities"/>
</properties>
<connectionParameters>
<entry name="database" value="crm_db"/>
<entry name="host" value="host_address"/>
<entry name="password" value="password"/>
<entry name="user" value="user"/>
</connectionParameters>
</sql>
</dataSource>
</dataSources>
<permissions>
<owner>support@belladati.com</owner>
</permissions>
</ns2:dataSet>
|
Content of the XML configuration file corresponds with the XSD schema belladati_1_0.xsd. Creating data setData set is defined by <dataSet> tag. Example Code Block |
---|
<ns2:dataSet xmlns:ns2="http://www.belladati.com/api/v1.0" name="CRM - opportunities">
...
</ns2:dataSet>
|
Section |
---|
Column |
---|
| Tag attribures name | type | required | description |
---|
name | string | true | Name of the data set |
|
Column |
---|
|
|
Nested tags name | type | cardinality | description |
---|
indicators | complex | 0..1 | Encloses the indicators and indicator groups | attributes | complex | 0..1 | Encloses the attributes | drilldownPaths | complex | 0..1 | Encloses the possible drilldown paths | dataSources | complex | 0..1 | Defines the data source | alers | complex | 0..1 | Encloses the alerts | permissions | complex | 0..1 | Encloses the permissions | reports | complex | 0..1 | Encloses the reports definitions |
Creating indicators and indicators groupsIndicator is represented by single object or is a part of a group of indicators. Indicators and groups are enclosed by <indicators> tag.
Creating indicatorSingle indicator is represented by <indicator> tag. Example Code Block |
---|
<indicators>
<indicator code="M_AMOUNT" name="Amount" unit="USD"/>
<indicator code="M_COUNT" name="Count"/>
</indicators>
|
Tag attribures name | type | required | description |
---|
code | string | true | Indicator's code. Must start with "M_" prefix and is unique within the dataset. | name | string | true | Name of the indicator | unit | string | false | Unit of the indicator | roundingType | string | false | Rounding mode - see http://download.oracle.com/javase/6/docs/api/java/math/RoundingMode.html for more information | format | string | false | Defines how the value of the indicator should be formatted |
Nested tags translations | complex | 0..1 | Encloses the indicator's translation | formula | CDATA value | 0..1 | Defines the formula, if the indicator's value is evaluated |
Example Code Block |
---|
<indicators>
<indicator code="M_AMOUNT" name="Amount" unit="USD"/>
<indicator code="M_COUNT" name="Count"/>
<indicator code="M_RATE" name="Rate">
<formula>M_AMOUNT / M_COUNT</formula>
</indicator>
</indicators>
|
Creating indicator's translationTranslation for indicator is supported by nested tag <translation> . Translations are compliant with indicators and indicator groups as well. Example Code Block |
---|
<indicators>
<indicator code="M_AMOUNT" name="Amount" unit="USD">
<translations>
<translation locale="de" value="Translated value"/>
</translations>
</indicator>
</indicators>
|
Tag attribures name | type | required | description |
---|
locale | string | true | Locale of the translation | value | string | true | Translated value |
Creating indicator groupIf you want more structured and hierarchical organized indicators, you can define it within the indicator group. Each indicator group consists of single indicators or nested indicators groups. Indicator group definition is enclosed in tag <indicatorGroup> . Example Code Block |
---|
<indicators>
<indicatorGroup name="group">
<indicator code="M_INDICATOR" name="indicator"/>
<indicatorGroup name="sub-group">
<indicator code="M_SUBGROUP_INDICATOR" name="sub-group indicator"/>
</indicatorGroup>
</indicatorGroup>
</indicators>
|
Tag attribures name | type | required | description |
---|
code | string | true | Indicator's code. Must start with "M_" prefix and is unique within the dataset. | name | string | true | Name of the indicator | unit | string | false | Unit of the indicator | roundingType | string | false | Rounding mode - see http://download.oracle.com/javase/6/docs/api/java/math/RoundingMode.html for more information | format | string | false | Defines how the value of the indicator should be formatted |
Nested tags indicator | complex | 0..1 | Nested indicator | indicatorGroup | complex | 0..1 | Nested indicator group |
Creating attributesAttributes entries <attribute> are defined within the <attributes> tag.
Example Code Block |
---|
<attributes>
<attribute code="L_CITY" name="City"/>
<attribute code="L_ID" name="Id"/>
<attribute code="L_NAME" name="Name"/>
<attribute code="L_OFFICE" name="Office"/>
<attribute code="L_PRODUCT" name="Product"/>
<attribute code="L_STATUS" name="Status"/>
</attributes>
|
Tag attribures name | type | required | description |
---|
code | string | true | Attribute's code. Must start with "L_" prefix and is unique within the dataset. | name | string | true | Name of the attribute |
Nested tags translations | complex | 0..1 | Encloses the attribute's translation (see indicator's translation) | memberTranslations | complex | 0..1 | Encloses the attribute member's translation | memberSettings | complex | 0..1 | Holds the attribute member's settings, like appearance |
Creating attribute's translationTranslation for attributes is supported by nested tag <translation> . Example Code Block |
---|
<attributes>
<attribute code="L_CITY" name="City"/>
<translations>
<translation locale="de" value="Translated value"/>
<translation locale="cs" value="Another translated value"/>
</translations>
</attribute>
</attributes>
|
Tag attribures name | type | required | description |
---|
locale | string | true | Locale of the translation | value | string | true | Translated value |
Creating member's translationExample Code Block |
---|
<attribute code="L_CITY" name="City">
<memberTranslations>
<memberTranslation memberValue="Prague" locale="cs" value="Praha"/>
<memberTranslation memberValue="Prague" locale="de" value="Prag"/>
</memberTranslations>
</attribute>
|
Defining attribute's appearanceExample Code Block |
---|
<attribute code="L_CITY" name="City">
<memberSettings>
<memberSetting icon="cs" backgroundColor="#c41019" color="#ffffff" memberValue="Prague"/>
</memberSettings>
</attribute>
|
Defining drilldown pathsExample Code Block |
---|
<drilldownPaths>
<pathAttribute code="L_ATTRIBUTE_1">
<pathAttribute code="L_ATTRIBUTE_2"/>
<pathAttribute code="L_ATTRIBUTE_2"/>
</pathAttribute>
</drilldownPaths>
|
|