Process raw data then only import summary to EazyBI

Hi, I am using REST API as my data source. And what I want to achieve is to process the raw data returned from API, then process the data and only send summary to EazyBI. For example:

This is the raw data returned by API.
[
{
“name”: “project1”,
“category”: “software”
},

{
	"name": "project2",
	"category": "software"
},

{
	"name": "project2",
	"category": "business"
}

]

What I need is to summarise data, and send the summary to EazyBI as my own format.

{
“project_total”: 3,
“project_software”: 2,
“project_business”: 1
“Import date”: “2019-02-28”
}

So I can use EazyBI to track the project number of different categories. And use “Import date” as the Time dimension to track the change.

I am wondering is it doable? say using the custom javascript? Thanks!

Hi,

There can be several similar solutions for creating such a report in eazyBI from your REST API data. Note that you can use the Javascript code and transform or extend the data you receive from the REST API endpoint: https://docs.eazybi.com/eazybi/data-import/import-from-rest-api#ImportfromRESTAPI-CustomJavaScriptcode

The idea for the solution is to define two more columns for your data giving the “counter” and import date of each row:

doc.project_total = 1;
doc.import_day = new Date().toISOString();

Then the data mapping could look like this:

After data import you can make a report as you described:

Kindly,
Janis, eazyBI