This article shows how to connect Helical Insight Application with a MongoDB datasource.

In Helical Insight version 1.0.1 beta currently we are not providing a UI for directly connecting to MongoDB which we are working upon. Meanwhile MongoDB datasource usage inside Helical Insight is a backend process.



There are 2 file types required for proper configuration of MongoDB datasource with Helical Insight application:

  • EFWD file
  • JSON file

Step1: Create a new folder in Helical Insight repository with the name “MongoDB Datasource”.
Repository Path (for windows), hence a folder like the one shown below gets created

C:\Helical Insight\hi-repository\MongoDB Datasource

Note: Repository path can vary, which will depend on where the Helical Insight Application is installed.

Step2:  Now, open “MongoDB Datasource” folder.

Step3:Then, create a file with content as shown below and save it as EFWD extension.

<EFWD>
    <DataSources>
      <Connection id="6" name="MongoDB Datasource" type="sql.calcite">
        <model>MongoDB Datasource/mongo-model.json</model>
        <driverName>org.apache.calcite.jdbc.Driver</driverName>
      </Connection>
    </DataSources>
</EFWD>



Step4: After creation of EFWD file, save the file as "MongoDB_datasource.efwd" (any name can be used) in a “MongoDB Datasource” folder present inside the helical repository.

Step5: Now, create a mongo-model.json file, enter JSON code in it and save the file. In a JSON code, there are 2 stages involved:

  1. Configuration of MongoDB Credentials :
  2. For the configuration, details required are MongoDB Server (either ip address or localhost is used based on the environment), Port Number, Username and Password which will be used in the JSON file.


    Note:
    If no authentication required to the mongo server then no need to enter username and password details.

    Format :

    operand: {
    host: 'localhost:27017',
    database: 'zips',
    username: 'hiuser',
    password: 'hiuser'
    }

    or

    operand: {
    host: 'localhost:27017',
    database: 'zips'
    }



  3. Configuration of tables(views) :
  4. For configuration, details required are database name, table name, type, column datatype and so on. In this case “zips” is used as sample database.

    Sample Configuration Details :

    {
    name: 'mongo',
    tables: [
      {
        name: 'category',
        type: 'view',
        sql: 'select cast(_MAP[\'city\'] AS VARCHAR(30)) AS \"city\",\n cast(_MAP[\'loc\'][0] AS float) AS \"longitude\", cast(_MAP[\'loc\'][1] AS float) AS \"latitude\",\n cast(_MAP[\'pop\'] AS INTEGER) AS \"pop\",\n cast(_MAP[\'state\'] AS VARCHAR(10) AS \"state\", cast(_MAP[\'_id\'] AS varchar(5)) AS \"id\"\n from \"mongo_raw\".\"category\"'
      }
     ]
    }


‘name’ is the name of the schema. For Example, name: ‘mongo’

Under tables array,

‘name’ is the name of the view. For Example, name: ‘category’

‘type’ is view

‘sql’ is the query to create the view

The syntax

cast(_MAP[\'city\'] AS varchar(20)) AS \"city\"

defines one column in the view.

  • In this sample ‘city’ is a string (hence varchar) and an alias ‘category_id’ is given to the column.
  • _MAP is the collection



Datatypes: Standard SQL datatypes like BOOLEAN, TIMESTAMP, SMALLINT, DECIMAL, DATE, INTEGER, VARCHAR, FLOAT, REAL etc can be used to define the column types.


Step6: Now, combining both the configuration details, the final JSON code is as shown below :

inline: {
  version: '1.0',
  defaultSchema: 'mongo',
  schemas: [
    {
      type: 'custom',
      name: 'mongo_raw',
      factory: 'org.apache.calcite.adapter.mongodb.MongoSchemaFactory',
      operand: {
             host: 'localhost:27017',
             database: 'zips'
        }
    },
    {
      name: 'mongo',
      tables: [
        {
          name: 'category',
          type: 'view',
          sql: 'select cast(_MAP[\'city\'] AS VARCHAR(30)) AS \"city\",\n cast(_MAP[\'loc\'][0] AS float) AS \"longitude\", cast(_MAP[\'loc\'][1] AS float) AS \"latitude\",\n cast(_MAP[\'pop\'] AS INTEGER) AS \"pop\",\n cast(_MAP[\'state\'] AS VARCHAR(10) AS \"state\", cast(_MAP[\'_id\'] AS varchar(5)) AS \"id\"\nfrom \"mongo_raw\".\"category\"'
        }		
      ]
    }
  ]
}


Step6: Following are the list of file types after configuration.

mongodb-files








Step7: Now, login to Helical Insight Application.

Step8: Click on the Metadata Tab.














Step9: Select Datasource Type as Virtual Datasource






















Step10: After selecting datasource type, Mongo datasource would be now available in the list.

Step11: Now, using this datasource, metadata can be created which will be then further utilized for Adhoc report creation.

For further assistance, kindly contact us on support@helicalinsight.com or post your queries at forum.helicalinsight.com

Leave a Reply

Helical Insight’s self-service capabilities is one to reckon with. It allows you to simply drag and drop columns, add filters, apply aggregate functions if required, and create reports and dashboards on the fly. For advanced users, the self-service component has ability to add javascript, HTML, HTML5, CSS, CSS3 and AJAX. These customizations allow you to create dynamic reports and dashboards. You can also add new charts inside the self-service component, add new kind of aggregate functions and customize it using our APIs.
Helical Insight’s self-service capabilities is one to reckon with. It allows you to simply drag and drop columns, add filters, apply aggregate functions if required, and create reports and dashboards on the fly. For advanced users, the self-service component has ability to add javascript, HTML, HTML5, CSS, CSS3 and AJAX. These customizations allow you to create dynamic reports and dashboards. You can also add new charts inside the self-service component, add new kind of aggregate functions and customize it using our APIs.
Helical Insight, via simple browser based interface of Canned Reporting module, also allows to create pixel perfect printer friendly document kind of reports also like Invoice, P&L Statement, Balance sheet etc.
Helical Insight, via simple browser based interface of Canned Reporting module, also allows to create pixel perfect printer friendly document kind of reports also like Invoice, P&L Statement, Balance sheet etc.
If you have a product, built on any platform like Dot Net or Java or PHP or Ruby, you can easily embed Helical Insight within it using iFrames or webservices, for quick value add through instant visualization of data.
If you have a product, built on any platform like Dot Net or Java or PHP or Ruby, you can easily embed Helical Insight within it using iFrames or webservices, for quick value add through instant visualization of data.
Being a 100% browser-based BI tool, you can connect with your database and analyse across any location and device. There is no need to download or install heavy memory-consuming developer tools – All you need is a Browser application! We are battle-tested on most of the commonly used browsers.
Being a 100% browser-based BI tool, you can connect with your database and analyse across any location and device. There is no need to download or install heavy memory-consuming developer tools – All you need is a Browser application! We are battle-tested on most of the commonly used browsers.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
A first-of-its-kind Open-Source BI framework, Helical Insight is completely API-driven. This allows you to add functionalities, including but not limited to adding a new exporting type, new datasource type, core functionality expansion, new charting in adhoc etc., at any place whenever you wish, using your own in-house developers.
A first-of-its-kind Open-Source BI framework, Helical Insight is completely API-driven. This allows you to add functionalities, including but not limited to adding a new exporting type, new datasource type, core functionality expansion, new charting in adhoc etc., at any place whenever you wish, using your own in-house developers.
It handles huge volumes of data effectively. Caching, Pagination, Load-Balancing and In-Memory not only provides you with amazing experience, but also and does not burden the database server more than required. Further effective use of computing power gives best performance and complex calculations even on the big data even with smaller machines for your personal use. Filtering, Sorting, Cube Analysis, Inter Panel Communication on the dashboards all at lightning speed. Thereby, making best open-source Business Intelligence solution in the market.
It handles huge volumes of data effectively. Caching, Pagination, Load-Balancing and In-Memory not only provides you with amazing experience, but also and does not burden the database server more than required. Further effective use of computing power gives best performance and complex calculations even on the big data even with smaller machines for your personal use. Filtering, Sorting, Cube Analysis, Inter Panel Communication on the dashboards all at lightning speed. Thereby, making best open-source Business Intelligence solution in the market.
With advance NLP algorithm, business users simply ask questions like, “show me sales of last quarter”, “average monthly sales of my products”. Let the application give the power to users without knowledge of query language or underlying data architecture
With advance NLP algorithm, business users simply ask questions like, “show me sales of last quarter”, “average monthly sales of my products”. Let the application give the power to users without knowledge of query language or underlying data architecture
Our application is compatible with almost all databases, be it RDBMS, or columnar database, or even flat files like spreadsheets or csv files. You can even connect to your own custom database via JDBC connection. Further, our database connection can be switched dynamically based on logged in users or its organization or other parameters. So, all your clients can use the same reports and dashboards without worrying about any data security breech.
Our application is compatible with almost all databases, be it RDBMS, or columnar database, or even flat files like spreadsheets or csv files. You can even connect to your own custom database via JDBC connection. Further, our database connection can be switched dynamically based on logged in users or its organization or other parameters. So, all your clients can use the same reports and dashboards without worrying about any data security breech.
Our application can be installed on an in-house server where you have full control of your data and its security. Or on cloud where it is accessible to larger audience without overheads and maintenance of the servers. One solution that works for all.
Our application can be installed on an in-house server where you have full control of your data and its security. Or on cloud where it is accessible to larger audience without overheads and maintenance of the servers. One solution that works for all.
Different companies have different business processes that the existing BI tools do not encompass. Helical Insight permits you to design your own workflows and specify what functional module of BI gets triggered
Different companies have different business processes that the existing BI tools do not encompass. Helical Insight permits you to design your own workflows and specify what functional module of BI gets triggered