Amazon festival offer

Saturday, 3 May 2014

1. What is Big Data ?

Big data is the term for a collection of data sets so large and complex that it becomes difficult to process using on-hand database management tools or traditional data processing applications. The challenges include capture, curation, storage, search, sharing, transfer, analysis, and visualization.

Every day, we create 2.5 quintillion bytes of data — so much that 90% of the data in the world today has been created in the last two years alone.
 According to IBM, 80% of data captured today is unstructured, from sensors used to gather climate information, posts to social media sites, digital pictures and videos, purchase transaction records, and cell phone GPS signals, to name a few. All of this unstructured data is Big Data.

When dealing with larger data sets, organizations face difficulties in being able to create, manipulate, and manage big data. Big data is particularly a problem in business analytics because standard tools and procedures are not designed to search and analyze massive datasets.

As per Gartner : "Big data is high volume, high velocity, and/or high variety information assets that require new forms of processing to enable enhanced decision making, insight discovery and process optimization.

Big data spans three dimensions: Volume, Velocity and Variety.

Volume (amount of data): Enterprises are awash with ever-growing data of all types, easily amassing terabytes—even petabytes—of information.
  • Turn 12 terabytes of Tweets created each day into improved product sentiment analysis
  • Convert 350 billion annual meter readings to better predict power consumption
Velocity (speed of data in and out): Sometimes 2 minutes are too late. For time-sensitive processes such as catching fraud, big data must be used as it streams into your enterprise in order to maximize its value.
  • Scrutinize 5 million trade events created each day to identify potential fraud
  • Analyse 500 million daily call detail records in real-time to predict customer churn faster
Variety (range of data types and sources): Big data is any type of data - structured and unstructured data such as text, sensor data, audio, video, click streams, log files and more. New insights are found when analyzing these data types together.
  • Monitor 100’s of live video feeds from surveillance cameras to target points of interest
  • Exploit the 80% data growth in images, video and documents to improve customer satisfaction

Thursday, 1 May 2014

How to develop a Tabular Report using iReport


In the previous post we saw how to develop a simple bar chart with optional where clause now will see how to develop a tabular report for the same set of records so user can also see the data when he clicks on the chart. 
 
Create a report with three input controls, p_year (java.lang.Integer), p_shipcountry(java.util.Collection) and p_shipcity(java.util.Collection).

Where p_year is a single select input control to select year means user can select only one year at a time, p_shipcountry is a Collection type input control, which is multiselect cascading input control means user can select multiple ship countries for the selected year and p_shipcity is also a Collection type multiselect cascading input control.

Query for the report:-

SELECT  YEAR(ORDERDATE) year,
                 MONTHNAME(ORDERDATE) month,
                  CONCAT(MONTHNAME(ORDERDATE), RIGHT(year(ORDERDATE), 2)) monthyear,
                  COUNT(*) orders
FROM orders
WHERE (YEAR(ORDERDATE) = $P{p_year} OR $P{p_year} IS NULL)
               AND $X{IN,shipcountry,p_shipcountry}
               AND $X{IN, shipcity,p_shipcity}
GROUP BY YEAR(ORDERDATE), MONTH(ORDERDATE)
ORDER BY YEAR(ORDERDATE), MONTH(ORDERDATE)

For Tabular report, we have to create a sub dataset. To add sub dataset follow these steps : -
1 - Go to Windows and select Report Inspector.
2- Right click on the report name and click on “Add Dataset” and select option “Create an empty dataset” and then finish, edit the dataset and paste the above query and add all the parameters and click on the Read Fields button.



Once sub dataset is ready, go to Window, select Palette, and then drag Tabular Component to the Summary or Title Band (Do not use Detail band for any chart and Tabular components)



Select The Dataset name that you just created for the report



Move the field in the same order in which you want in the report.



Use alternated detail rows background option to get the alternate row color.
You can also select the “Add Column Footer” option if you want the total by column.


 Edit the sub datsource and pass all the parameters.





 

Click on the Preview button.


You can find the jrxml file here which i used for this post.
 Tabular report

Useful links:-

Saturday, 26 April 2014

How to add MouseOver(Tool Tip) Property to the chart in iReport



Tooltip property provide to show the value when mouse over event occur on that particular bar
To add the tooltip property open iReport, right click on the chart and select “Chart Data” (You can add also by selecting Hyperlink option)


After selection Chart Data go to Detail sections and select the Category Series, then Modify and select Item Hyperlink section and give the expression for mouse over, here in this case it will be
$F{ORDERS}.toString()   where .toString() convert Integer values to String.




Other useful links:-



Setting Default Values for Input Controls in iReport



There are multiple type of input controls in iReport which we use in reports :  -

1   1-      Text (java.lang.String)

                 Single select string input control.
                  Example: -    “India”

2   2-      Integer(java.lang.Integer)
                             
           Single select integer input control (p_year)
           Example: -       1997

3   3-      Collection(java.util.Collection)

           Multiselect input control for string and integer values (p_shipcountry)
           Example: -  new ArrayList(Arrays.asList(new String[] {“India”,”US”}))

4   4-      Date(java.util.Date)

            Date parameter, months start from 0 to 11
             Example for 2014-04-26: - new Date(114,3,26)

5   5-      Boolean(java.lang.Boolean)

          Boolean values for true or false type values.
          Example: - “true”