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 concept

XML 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.

On this page:

XML configuration file structure

As 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:

<?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 set

Data set is defined by <dataSet> tag.

Example

<ns2:dataSet xmlns:ns2="http://www.belladati.com/api/v1.0" name="CRM - opportunities">
   ...
</ns2:dataSet>

Tag attribures

name

type

required

description

name

string

true

Name of the data set

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 groups

Indicator is represented by single object or is a part of a group of indicators. Indicators and groups are enclosed by <indicators> tag.

Creating indicator

Single indicator is represented by <indicator> tag.

Example

<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

Creating indicator with formula

Example

<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 translation

Translation for indicator is supported by nested tag <translation>. Translations are compliant with indicators and indicator groups as well.

Example

<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 group

If 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

<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 attributes

Attributes entries <attribute> are defined within the <attributes> tag.

Example

<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 translation

Translation for attributes is supported by nested tag <translation>.

Example

<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 translation

Example

<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 appearance

Example

<attribute code="L_CITY" name="City">
   <memberSettings>
       <memberSetting icon="cs" backgroundColor="#c41019" color="#ffffff" memberValue="Prague"/>
   </memberSettings>
</attribute>

Defining drilldown paths

Example

<drilldownPaths>
   <pathAttribute code="L_ATTRIBUTE_1">
       <pathAttribute code="L_ATTRIBUTE_2"/>
       <pathAttribute code="L_ATTRIBUTE_2"/>
    </pathAttribute>
</drilldownPaths>
  • No labels