Post on 04-Jun-2020
transcript
IBM Cúram Social Program Management
Reading multi-temperature data with Cúram SPMP Analytics
Anthony Farrell is a senior software engineer in the IBM Cúram platform group. Anthony has technical responsibility for Business Intelligence in the Cúram platform, has 10 years’ experience of Cúram product development, is a certified Java programmer with strong Java, Java Platform Enterprise Edition, and business intelligence experience. Anthony Farrell AnthonyFarrell@ie.ibm.com
© Copyright International Business Machines Corporation 2015. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Introduction
1
CONTENTS
1 Introduction ....................................................................................................... 2
1.1 Purpose ................................................................................................ 2
1.2 Audience .............................................................................................. 2
1.3 Prerequisites ........................................................................................ 2
1.4 Downloads ........................................................................................... 2
2 Installing the tool ............................................................................................... 3
3 Testing the installation ...................................................................................... 4
3.2 Create a warm bootstrap properties file ................................................ 4
3.3 Configure Tomcat and display the test report ....................................... 4
4 Configuring your environment ........................................................................... 5
4.1 Configuring your BIRT Eclipse IDE ....................................................... 5
4.2 Configuring your BIRT enterprise archive file (CuramBIRTViewer.ear) . 6
5 Supported environments explained ................................................................... 7
5.1 The Eclipse IDE used to develop BIRT reports ..................................... 7
5.2 The Eclipse IDE used to view the Cúram application ............................ 7
5.3 The application server .......................................................................... 7
6 Acknowledgements ........................................................................................... 8
7 Further Reading ................................................................................................ 8
Copyright ...................................................................................................................... 9
Reading multi-temperature data with Cúram SPMP Analytics
2
1 Introduction Organizations want up-to-date analytics while minimizing the impact on the Cúram application. The size and complexity of your analytic workloads should not affect the responsiveness of the Cúram application. A key strategic requirement is to ensure maximum application throughput, and support analytic workloads. In general, more recent data in the Cúram application database is much more likely than older data to be accessed by queries, batch jobs, deferred process, or to be updated. Therefore, such data is called hot. As time goes by, data tends to cool off, becoming warm and later cold, meaning that the probability of updating this data decreases. Analytical data, where data is less likely to be updated, is referred to as warm data in this article. Not all analytics require real-time data. There are classes of analytics where latency in the analytic view is acceptable or even preferred. Analytical data, where data latency is acceptable, is referred to as warm data in this article. With warm data, you have possibility of a classic software trade-off. You can trade “latency in the analytic view” against “reducing the analytic workload on the Cúram application database”. Most production topologies or deployed environments mirror the production database to redundant systems, via real-time replication or frequent database backup/restores. This mirrored database can act as a warm Cúram data store. Depending on your topology, you might consider your redundant database systems to process some of your analytic workload.
1.1 Purpose
This developerWorks article provides an approach allowing you to build BIRT analytics reading warm Cúram data. This article provides a tool that allows you to read warm Cúram data, so that you can create analytics and remove workload from the live Cúram application database.
1.2 Audience
This article is intended for technical users who are tasked with developing solutions that use Cúram Social Program Management Platform Analytics on Cúram Social Program Management Platform.
1.3 Prerequisites
An installed IBM Cúram application development environment.
IBM Cúram Social Program Management Platform version 6.1.0.1 or higher. The tools in this article were tested against Cúram version 6.1.0.1 and WebSphere 8.5.5.5.
Knowledge of SPMP Analytics.
Deployment skills and the ability to deploy the tools in a Cúram Eclipse development environment.
1.4 Downloads
The sample tool is posted with this article on the Cúram on developerWorks community.
Table 1 : Downloads
Description Name Size
Sample tool ReadingMultitemperatureDataWithSPMPAnalytics.zip 22.3 KB
Installing the tool
3
2 Installing the tool Complete the following steps to install the tool that accompanies this article:
Download the tool and extract the contents to a temporary location, for example c:\developerWorks. There are three files:
a. curam-birt-mtd.jar. This JAR file contains the implementation of the
warm BIRT data source.
b. curamMultiTempertureDataLibrary.rptlibrary. This is a BIRT
library file, common features are added to BIRT library files. Library features can then be imported and used in many BIRT reports, reducing development time.
c. SampleForWarmDB.rptdesign. This file is a test report, to verify that
your installation was completed successfully. This BIRT report uses the new warm data source to connect to a warm Cúram application database.
From the extract location, copy the file curam-birt-mtd.jar to %CURAM_DIR%\
BIApp\CuramBIRTViewer\WebContent\WEB-INF\lib. The following steps
are all relative to the root of the Cúram installation, which is defined by the %CURAM_DIR% environment variable. By default, the environment variable is set
to C:\IBM\Curam\Development.
From the extract location, copy the file
curamMultiTempertureDataLibrary.rptlibrary to %CURAM_DIR%\ BIApp\CuramBIRTViewer\WebContent\WEB-
INF\bicontent\resources\library
From your Cúram BI content folder, %CURAM_DIR%\BIContent, go to the
components folder, within the components folder create a new folder named
multitemperature.
From the extract location, copy the file SampleForWarmDB.rptdesign to your
new multitemperature folder, for example copying to %CURAM_DIR%\
BIContent\components\multitemperature.
Reading multi-temperature data with Cúram SPMP Analytics
4
3 Testing the installation Complete the following steps to test the tool that accompanies this article.
3.1 Publish the test report to the run time viewer.
From your Cúram BI content folder, %CURAM_DIR%\BIContent, run the following command to
publish the new chart SampleForWarmDB.rptdesign to the run time viewer:
build client.birt
3.2 Create a warm bootstrap properties file
The WarmBootstrap.properties file contains the machine-specific configuration properties
for initially getting a connection to the warm database.
1. From your Cúram EJBServer project properties folder,
%CURAM_DIR%\EJBServer\project\properties, create a new folder called
multitemperature, copy your Bootstrap.properties file into this new folder.
Rename the file from Bootstrap.properties to WarmBootstrap.properties.
2. Change properties within your WarmBootstrap.properties file to point to your
warm Cúram application database. Pay specific attention to the following elements;
curam.environment.bindings.location, curam.db.username,
curam.db.password, curam.db.type, curam.db.name,
curam.db.servername, curam.db.serverport
3. From your Cúram EJBServer folder, %CURAM_DIR%\EJBServer, test your
WarmBootstrap.properties. Run the following command to verify that your
database connection is valid:
build configtest
-Dprop.file=%CURAM_DIR%\EJBServer\project\properties\
multitemperature\WarmBootstrap.properties
To check the database connection is successful, you should see the following output: [configtest] -- DATABASE CONFIGURATION --.
[configtest] curam.db.type : DB2.
[configtest] -- DATABASE CONNECTIVITY --.
[configtest] Database Connection established.
3.3 Configure Tomcat and display the test report
To configure Tomcat to display the test report, complete the following steps:
From Eclipse, go to the CuramBIRTViewer project, right-click, and select Tomcat
project>Update context definition. From Eclipse, start Tomcat.
From Window > Preferences > Tomcat > JVM Settings Classpath section, click Folder. Select the full path to
%CURAM_DIR%\EJBServer\project\properties\multitemperature and click
OK.
From within Eclipse, start Tomcat.
From your browser, enter the following URL http://localhost:9080/CuramBIRTViewer/List. This URL displays a list of
available reports.
Configuring your environment
5
Scroll down to the entry, SampleForWarmDB.rptdesign, from the Mode column
select R to display the report, the following sample report is displayed, see Table 2.
Table 2 Sample output from SampleWarmDB.rptdesign
4 Configuring your environment The following sections show how to use the warm data source in your BIRT Eclipse IDE and how to create an enterprise archive file, which can be deployed on an application server.
4.1 Configuring your BIRT Eclipse IDE
The SPMP Analytics accelerator contains steps showing how to install BIRT Development prerequisites. To test and view reports from the BIRT Eclipse-IDE, you can use the BIRT report preview feature. To enable the report preview feature, you must now complete the following steps:
Go to the folder where you installed the BIRT Report Designer, for example
C:\birteclipse.
Copy the file curam-birt-mtd.jar to the viewer folder, for example, C:\birteclipse\plugins\org.eclipse.birt.report.viewer_4.4.1.v201
409151154\birt\scriptlib
To test the BIRT report preview feature, you can run the sample test report
SampleWarmDB.rptdesign. To run the test report complete the following steps:
1. Restart BIRT Eclipse.
Reading multi-temperature data with Cúram SPMP Analytics
6
2. From Eclipse, select Windows > Preferences > Report Design. This step ensures that your Eclipse workspace is correctly configured for BIRT report development. Click OK.
3. From the BIRT Eclipse workspace, select the Project Explorer tab.
4. From the Curam BI Content project, go to components\multitemperature and
double-click the SampleWarmDB.rptdesign file to display the report in the Layout
tab 5. From the BIRT Eclipse IDE, select the drop-down arrow beside the globe icon in the
toolbar and click View Report as HTML.
4.2 Configuring your BIRT enterprise archive file (CuramBIRTViewer.ear)
The following steps show you how to update your CuramBIRTViewer component to build an enterprise archive file that can be deployed with WebSphere. Complete the following steps to
add a warm data source to your CuramBIRTViewer.ear file:
Edit the %CURAM_DIR%\BIApp\CuramBIRTViewer\components\core\WebContent\WEB
-INF\web.xml file, adding the following xml stanza directly after the entry <resource-ref id="ResourceRef_BIRTViewercuramdb002">:
<resource-ref id="ResourceRef_BIRTViewercuramdb003">
<description>The Curam warm data source</description>
<res-ref-name>jdbc/curamdbwarm</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Edit the %CURAM_DIR%\BIApp\CuramBIRTViewer\ear\WAS\ClientModule\WEB-
INF\ibm-web-bnd.xml file, adding the following xml stanza directly after the entry <resource-ref binding-name="jdbc/curamdm" name="jdbc/curamdm"/>:
<resource-ref binding-name="jdbc/curamdbwarm"
name="jdbc/curamdbwarm"/>
Edit the %CURAM_DIR%\BIApp\CuramBIRTViewer\ear\WAS\ClientModule\WEB-
INF\ibm-web-bnd.xmi file, adding the following xml stanza directly after the entry <resRefBindings xmi:id="ResourceRef_BIRTViewercuramdb002"
jndiName="jdbc/curamdm">:
<resRefBindings xmi:id="ResourceRef_BIRTViewercuramdb003"
jndiName="jdbc/curamdbwarm">
<bindingResourceRef
href="WEB-INF/web.xml#ResourceRef_BIRTViewercuramdb003"/>
</resRefBindings>
To build a new enterprise archive file, CuramBIRTViewer.ear, from your EJBServer folder,
%CURAM_DIR%\EJBServer, run the following build target:
build biapp.BIRTViewerEARs
You must manually create the Data Source on the application server, the creating a Datamart data source on WebSphere has instructions on how to create a data source. When completing
the steps to set the JNDI resource name, set the Data source name field to
curamdbwarm, set the JNDI Name field to jdbc/curamdbwarm.
.
Supported environments explained
7
5 Supported environments explained The data source that is provided in this article must work with three distinct ecosystems within the Cúram development environment. The following table summarizes the BIRT data sources that are supported. These data sources can connect to the database when the report is deployed to Tomcat or an application server.
Table 3 BIRT data sources supported
Name in BIRT Description Installed with
CuramDB This connects to the Cúram application. IBM SPMP.
CuramDM This connects to the Cúram BIA data mart. IBM Cúram BIA. CuramWarmDB This connects to a warm Cúram application. This developerWorks article.
5.1 The Eclipse IDE used to develop BIRT reports
This is a second Eclipse instance for BIRT development, this is required as the BIRT plug-in is not compatible with the RSA plug-ins that are used for Java development. This environment allows you to develop new BIRT reports and to preview reports. You must enter the data source JDBC connection properties manually in this environment. The steps showing how to add a data source to a report and how to manually configure a JDBC connection are described in the SPMP Analytics accelerator.
5.2 The Eclipse IDE used to view the Cúram application
This Eclipse-based IDE is used to develop and view the Cúram application. This includes a Tomcat installation allowing you to start Tomcat from within Eclipse. Tomcat contains a servlet container to run the Cúram client web applications. BIRT analytics recognize they are within a Tomcat environment and read the data source JDBC connection properties from the Cúram bootstrap properties file. To allow a data source to read the bootstrap properties file, you must complete the steps setting up Eclipse with the CuramBIRTViewer. See also the steps creating a Datamart data source on WebSphere.
5.3 The application server
BIRT analytics recognize they are within a supported application server environment. The supported data sources now request a database connection from the JNDI service. The JDBC connection properties are ignored, and a JNDI name is used instead. The following JNDI names are supported.
Table 4 Supported JNDI data source names
BIRT in BIRT JNDI Name Installed with
CuramDB jdbc/curamdb IBM Cúram SPMP. CuramDM jdbc/curamdm IBM Cúram BIA. CuramWarmDB jdbc/curamdbwarm This developerWorks article.
Reading multi-temperature data with Cúram SPMP Analytics
8
6 Acknowledgements The author would like to thank the following members of Cúram product development team for their input, support, testing and reviews:
Joseph Glackin, Senior Software Engineer, who tested the tools in this article and performed a technical review this document.
Eoin Fitzpatrick, Software Engineer, Cúram Product Development, Cúram and Smarter Care, IBM Watson Health, who tested the tools in this article and performed a technical review this document.
Paraic O'Raghallaigh, information architect, Content Strategy, Cúram and Smarter Care.
John Delaney, Senior Software Engineer, Cúram and Smarter Care, IBM Watson Health, who performed a technical review of the document.
7 Further Reading Cúram Social Program Management http://www-01.ibm.com/support/knowledgecenter/SS8S5A/welcome?lang=en Cúram SPMP Analytics Accelerator http://www-01.ibm.com/support/knowledgecenter/SS8S5A_6.1.0/com.ibm.curam.content.doc/SPMAnalytics/SPMOverview/c_SPM_SPMAnalyticsOverview.html Installing a Cúram Development Environment
http://www-01.ibm.com/support/knowledgecenter/SS8S5A_6.1.0/com.ibm.curam.content.doc/install_DevelopmentEnvironment/ctr_install_installingthedevelopmentenvironment.html?lang=en Cúram Business Intelligence and Analytics
http://www-03.ibm.com/software/products/en/business-intelligence-analytics
Reading multi-temperature data with Cúram SPMP Analytics
9
Copyright
®
© Copyright IBM Corporation 2015 IBM United States of America Produced in the United States of America US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not grant you any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing IBM Corporation North Castle Drive Armonk, NY 10504-1785 U.S.A.
The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PAPER “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes may be made periodically to the information herein; these changes may be incorporated in subsequent versions of the paper. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this paper at any time without notice. Any references in this document to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk.
IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing IBM Corporation 4205 South Miami Boulevard Research Triangle Park, NC 27709 U.S.A. All statements regarding IBM's future direction or intent are subject to change or withdrawal without notice, and represent goals and objectives only. This information is for planning purposes only. The information herein is subject to change before the products described become available. If you are viewing this information softcopy, the photographs and color illustrations may not appear.
10
Trademarks IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol (® or ™), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the web at "Copyright and trademark information" at http://www.ibm.com/legal/copytrade.shtml.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.
Other company, product, or service names may be trademarks or service marks of others.