Monday, August 11, 2014

My Experience of using Enbeddable report on BlueMix

IBM has provide the Embeddable report service on BlueMix platform,how it look like? Today I will write my experience of using this.

Based on the official document,the current report service is still in beta version.It lets you run IBM Cognos Business Intelligence reports within your Bluemix environment. The reporting service is based on Cognos BI and supports content that was authored using Cognos BI Dynamic Query mode. The service runs against supported JDBC data source connections with applications that use one of our supported Bluemix runtime environments. You can use the provided REST-based interface to run reports and easily integrate reporting into your applications.

So let us experience for that. You can get the sample from the below link.
https://www.ng.bluemix.net/docs/#services/EmbeddableReporting/index.html#gettingstartedtemplate
The demostrate sample you can download form the below link.
https://erservice-beta1.ng.bluemix.net/public/sample-1.0.zip.

Some key steps for the sample.
1.Create a java liberty application on BlueMix.Here I named reportsample as the application name.
2.Create there services to bind this application.See below image.
a)MongoDB
The Embeddable Reporting service supports MongoDB as the repository for all reporting artifacts, which include:
  • Report specifications
  • Data source connections
  • (Optional) IBM Cognos Business Intelligence C10 model
b)SQLDB
It keeps the data which you will use this data to render your report based on this data.
c)Embeddable Reporting
It populate the MongoDB repository with your report artifacts from the service console that is associated to your instance of IBM Embeddable Reporting for Bluemix
 3. Unzip the sample,zip you can see below strcture
4.Click the SQLDB service console,upload the branch.csv,products.csv,sales.csv under data folder into the sqldb table.Pls use load data feature to upload you csv to create the db data and table in sqldb service.
5.Pls record the db credntial information for reporting service configuration.You can click
Show Credentials link to check these kinds of info.

For mongo db


{
  "mongolab": {
    "name": "MongoLab-2v",
    "label": "mongolab",
    "plan": "sandbox",
    "credentials": {
      "uri": "mongodb://XXXXXXX.mongolab.com:35257/IbmCloud_2g1be8as_1raue6of"
    }
  }
}

For sql db

{
  "sqldb": {
    "name": "SQL Database-hq",
    "label": "sqldb",
    "plan": "sqldb_small",
    "credentials": {
      "port": 50000,
      "db": "I_992247",
      "username": "XXXXXX",
      "host": "23.246.233.41",
      "hostname": "23.246.233.41",
      "jdbcurl": "jdbc:db2://XXXXXXXXXX:50000/I_992247",
      "uri": "db2://XXXXXXX:XXXXXX@23.246.233.41:50000/I_992247",
      "password": "XXXXXX"
    }
  }
}
6.Launch the Embeddable Reporting service,first you need to connect the mongdb use step 5
mongodb uri list in step five.
 
 
7.After connect,you need to import your report model on that.
8.Update the sqldb credential info based on step 5 and update the value in the provide
 screenshot.
9. Using the cf utility, log in to the Bluemix environment.
 
 Usage: cf login -a https://api.ng.bluemix.net -o <Bluemix ID>
When prompted, enter your email address and password.

The next step push report app on the BlueMix.

cf push reportsample -p  defaultServer
 
10.Launch the report web application through the url.
 

No comments:

Post a Comment