What you should know about Stored Procedure Universe in BI 4.0 ?

As we all know there are many advantages of using stored procedures, they are always in my problem resolving kit, as a last resort I have to use it to create one of the complex report that needs to be delivered  as Web Intelligence report. Apart from providing many advantages like transaction control, speed, complex logic support, security and data access, they are powerful enough to deliver complex reports.  My all time favorite tool is to use Universe, I have to use stored procedure to develop a report that takes data from multiple excel files including few database tables,  one other thing I would like to mention is the data from excel file changes everyday.  Luckily Business Objects supports stored procedure universes and I have used it to deliver this requirement.

I would like to bring my experience to all my readers who are interested in learning what stored procedure universe can offer to a developer or an end-user. I would like to point out what is possible and what is not possible with Stored Procedure universe and I hope it should give a clear understanding when one can utilize it.  I am using BI 4.0 with Oracle 11g database.

What is a Stored Procedure?: Sets of SQL statements that are saved as executable files in a database fully parsed. 
What is a REF Cursor?: A pointer to a work area in which a result set is stored.

What are the other requirements needed at first place ?

  • Create package that defines the REF CURSOR. This REF CURSOR must be strongly bound to a static pre-defined record structure.
  • The procedure must have a parameter that is a REF CURSOR type.
  • The REF CURSOR parameter must be defined as IN OUT (read/write mode).
  • The stored procedure can only return one ResultSet
  • Test and run the stored procedure in an SQL Tool like TOAD or SQL*PLUS

Once all of the above requirements have been met, verify that the database driver that you are using works with that version of Oracle.

I am using SCOTT schema from Oracle.  Following is a package emp_package declaration for a strongly typed cursor in Oracle using EMP table.  REF CURSOR emp_row_type returns a result set of type emp%rowtype

image

Following is a structure of the stored procedure, it shows how to use or refer emp_row_type REF CURSOR data type declared in the emp_package.

image

The name of the stored procedure is getEmployeesByDepartment, It accepts a parameter value for a department column and returns the data from the EMP table. We will use this stored procedure to build a universe in Business Object. First create a secure connection that connects to the database and also make sure you have selected the checkbox ‘Click here to choose stored procedure universe’ as shown in the screenshot below. This will indicate that it is a stored procedure universe

image

If stored procedure has parameters, it will now ask to enter information for the ParameterPrompt Label and what it should do on ‘Next execution’ ?. If you see the screenshot below it shows value column, prompt label and Next execution drop down box. Click OK to save and close this window.

image

Once all the information is provided, it will display a table in the universe pane as shown below, this table contains all the columns that will be returned by the stored procedure. In this example, I have created a class namedEmployee with two measure objects like Sal(Salary) and Comm(Commission).  Similar to an ad hoc universe one can use the stored procedure without an issue.  There are no joins, no contexts in the universe, all the business layer logic is stored in the stored procedure itself. 

image

You can save the universe and export it to the repository.  Now, you can use this stored procedure universe to develop Web Intelligence reports.  You can drag and drop the objects similar to any other Universe. There are few things that are not possible in query panel.  You cannot create additional prompts or add additional criteria in query panel. You can refresh and view the returned data from the database.

image

Now use the Universe to create a Web Intelligence report.  I have selected all the columns that were returned by the stored procedure.

image

What is possible in a Stored Procedure Universe ? 

    You can change the data type of an object 
    You can set object properties of an object 
    
You can do the check integrity of stored procedure universe 
    You can use stored procedure objects in result pane while creating report. 
    
You can apply sort on an object if required. 
    
You can apply access restriction for a user or group. 
    
You can set a prompt value if the stored procedure accepts a prompt. 

What is not possible in a Stored Procedure Universe ?

     You cannot use a stored procedure object in the criteria pane in query panel of Web Intelligence report. 
     You cannot change the definition of a Universe object, it is disabled or grayed out by default. 
     You cannot create a pre-defined filter using a stored procedure Universe object, it is disabled or grayed out in the Universe. 
    You cannot INSERT another stored procedure in a stored procedure universe. 
    You cannot INSERT a table in the stored procedure universe. 
    You cannot call a stored procedure from a Derived Table in Universe. 
    You cannot apply INDEX AWARENESS on stored procedure Universe objects. 
    You cannot create custom or new objects that were created for certain purpose based on stored procedure objects.

In conclusion I would say that there are limitations of using Stored procedure universe, lot of things not possible at the Universe Level and the universe becomes like a read only Universe. There is a little control on the Universe side which is changing a connection such as ODBC to Native.  Would use this feature only as last resort.  If you have any comments please share it through the comments section below.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
城市应急指挥系统是智慧城市建设的重要组成部分,旨在提高城市对突发事件的预防和处置能力。系统背景源于自然灾害和事故灾难频发,如汶川地震和日本大地震等,这些事件造成了巨大的人员伤亡和财产损失。随着城市化进程的加快,应急信息化建设面临信息资源分散、管理标准不统一等问题,需要通过统筹管理和技术创新来解决。 系统的设计思路是通过先进的技术手段,如物联网、射频识别、卫星定位等,构建一个具有强大信息感知和通信能力的网络和平台。这将促进不同部门和层次之间的信息共享、交流和整合,提高城市资源的利用效率,满足城市对各种信息的获取和使用需求。在“十二五”期间,应急信息化工作将依托这些技术,实现动态监控、风险管理、预警以及统一指挥调度。 应急指挥系统的建设目标是实现快速有效的应对各种突发事件,保障人民生命财产安全,减少社会危害和经济损失。系统将包括预测预警、模拟演练、辅助决策、态势分析等功能,以及应急值守、预案管理、GIS应用等基本应用。此外,还包括支撑平台的建设,如接警中心、视频会议、统一通信等基础设施。 系统的实施将涉及到应急网络建设、应急指挥、视频监控、卫星通信等多个方面。通过高度集成的系统,建立统一的信息接收和处理平台,实现多渠道接入和融合指挥调度。此外,还包括应急指挥中心基础平台建设、固定和移动应急指挥通信系统建设,以及应急队伍建设,确保能够迅速响应并有效处置各类突发事件。 项目的意义在于,它不仅是提升灾害监测预报水平和预警能力的重要科技支撑,也是实现预防和减轻重大灾害和事故损失的关键。通过实施城市应急指挥系统,可以加强社会管理和公共服务,构建和谐社会,为打造平安城市提供坚实的基础。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值