Dear visitor, despite all the challenges, our team continues operating at full speed.

We are ready to help with any questions you may have. Please fill out this quick form and we'll get back to you.

Fill the form
Get Free Trial

fm-product-sales definition

Answered
MC asked on July 7, 2020

Could you provide the definition of the index ‘fm-product-sales’? It would help understanding the examples…
Thank you.

3 answers

Public
Vera Didenko Flexmonster July 7, 2020

Hello, 
 
Thank you for writing to us. 
 
If we understand correctly, you are checking out the Flexmonster Data Sever and would like to see how the "fm-product-sales" index is defined for it.
 
The index dataSource object property can be viewed as a reference/name of the dataset that Flexmonster should connect to.
The "fm-product-sales" index is defined in the Flexmonster Data Server configuration file  (flexmonster-config.json) shown below:

{
"DataSources": [
{
"Type": "json",
"Indexes": {
"fm-product-sales": {
"Path": "sample-data/data.json"
}
}
}
],

"Security": {

"Authorization": {
"Enabled": false
},
"CORS": {
"AllowOrigin": "*"
}
},

"DataStorageOptions": {
"DataRefreshTime": "60"
},

"Port": "9500",

"HTTPS": {
"Enabled" : true
}
}

You can define several datasets in the Flexmonster Data Server configuration. 
By associating each dataset with a name (index), you can then choose which dataset to connect to in Flexmonster, for example: 

var pivot = new Flexmonster({
container: "#pivot-container",
report: {
"dataSource": {
"type": "api",
"url": "https://olap.flexmonster.com:9500",
"index": "fm-product-sales"
}
}
});

 
The full list of the Flexmonster Data Server configuration options is presented in the following guide: https://www.flexmonster.com/doc/configurations-reference/
 
 
Please let us know if this helps. If any questions remain, please feel free to reach out. 
Looking forward to your feedback. 
 
Kind regards, 
Vera

Public
MC July 7, 2020

Hello,
yes, thx for the answer.
We are currently using Flexmonster with Mondrian and are looking to Flexmonster Data Server. Our data is stored in a MSSQL Sever DB. If we understand correctly we have to collect all the data using sql queries (and mapping it to indexes) and than we can customize the report aggregating the data, or selecting a subset of the columns,… .
This means, everything we have defined for cubes must be mapped to standard sql in order to define the indexes?

Public
Vera Didenko Flexmonster July 8, 2020

Hello, 
 
Thank you for your response. 
 
Yes, we would like to confirm that for the Microsoft SQL Server database, SQL queries need to be specified in the index definitions.
Then on the client-side you can switch between indexes and visualize the desired data slice. For connecting Flexmonster to a different data index during runtime, the connectTo() API call can be used. 
 
We kindly recommend seeing our guide dedicated to connecting to Microsoft SQL Server database: https://www.flexmonster.com/doc/connect-to-mssql-database/
 
Please let us know if this helps and if any further questions arise.
Looking forward to your reply.
 
Kind regards, 
Vera

Please login or Register to Submit Answer