Supporting Data Set Joins in BIRT



Similar documents
Visual Basic. murach's TRAINING & REFERENCE

Generating Open For Business Reports with the BIRT RCP Designer

Chapter 9 Joining Data from Multiple Tables. Oracle 10g: SQL

SQL Server Replication Guide

Hands-On Lab. Building a Data-Driven Master/Detail Business Form using Visual Studio Lab version: Last updated: 12/10/2010.

Video Administration Backup and Restore Procedures

Monitoring MySQL database with Verax NMS

Arctic Network SQL Server Data Analysis Using Microsoft Access

Social Relationship Analysis with Data Mining

Terms and Definitions for CMS Administrators, Architects, and Developers

INTRODUCTION: SQL SERVER ACCESS / LOGIN ACCOUNT INFO:

Sales Person Commission

SQL Server An Overview

Building A Very Simple Web Site

DEVELOPING CONTRACT - DRIVEN WEB SERVICES USING JDEVELOPER. The purpose of this tutorial is to develop a java web service using a top-down approach.

ThirtySix Software WRITE ONCE. APPROVE ONCE. USE EVERYWHERE. SMARTDOCS SHAREPOINT CONFIGURATION GUIDE THIRTYSIX SOFTWARE

Pharmacy Affairs Branch. Website Database Downloads PUBLIC ACCESS GUIDE

Metadata Import Plugin User manual

Data Tool Platform SQL Development Tools

OLAP Cube Manual deployment and Error resolution with limited licenses and Config keys

Data Domain Profiling and Data Masking for Hadoop

2012 Teklynx Newco SAS, All rights reserved.

Analytics Canvas Tutorial: Cleaning Website Referral Traffic Data. N m o d a l S o l u t i o n s I n c. A l l R i g h t s R e s e r v e d

Release Notes Scribe Adapter for Microsoft Dynamics

Practical Example: Building Reports for Bugzilla

When a variable is assigned as a Process Initialization variable its value is provided at the beginning of the process.

Building Views and Charts in Requests Introduction to Answers views and charts Creating and editing charts Performing common view tasks

Parameter Fields and Prompts. chapter

ADP Workforce Now V3.0

6 th Annual EclipseCon Introduction to BIRT Report Development. John Ward

v4.8 Getting Started Guide: Using SpatialWare with MapInfo Professional for Microsoft SQL Server

BID2WIN Workshop. Advanced Report Writing

Lab # 5. Retreiving Data from Multiple Tables. Eng. Alaa O Shama

Oracle Fusion Middleware

FileMaker 12. ODBC and JDBC Guide

Tech Note 663 HMI Reports: Creating Alarm Database (WWALMDB) Reports

Note: With v3.2, the DocuSign Fetch application was renamed DocuSign Retrieve.

ODBC Client Driver Help Kepware, Inc.

Managing Third Party Databases and Building Your Data Warehouse

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

USING MYWEBSQL FIGURE 1: FIRST AUTHENTICATION LAYER (ENTER YOUR REGULAR SIMMONS USERNAME AND PASSWORD)

FileMaker 11. ODBC and JDBC Guide

Customizing MISys Manufacturing Reports Using ADO-XML 6/3/2013

Release 2.1 of SAS Add-In for Microsoft Office Bringing Microsoft PowerPoint into the Mix ABSTRACT INTRODUCTION Data Access

Using SQL Server Management Studio

How To Use Query Console

Spectrum Technology Platform. Version 9.0. Administration Guide

TechTips. Connecting Xcelsius Dashboards to External Data Sources using: Web Services (Dynamic Web Query)

Query. Training and Participation Guide Financials 9.2

Qlik REST Connector Installation and User Guide

Tips and Tricks SAGE ACCPAC INTELLIGENCE

2874CD1EssentialSQL.qxd 6/25/01 3:06 PM Page 1 Essential SQL Copyright 2001 SYBEX, Inc., Alameda, CA

Exploring Microsoft Office Access Chapter 2: Relational Databases and Multi-Table Queries

Deploying Physical Solutions to InfoSphere Master Data Management Server Advanced Edition v11

COSC 6397 Big Data Analytics. 2 nd homework assignment Pig and Hive. Edgar Gabriel Spring 2015

LABSHEET 1: creating a table, primary keys and data types

New 11g Features in Oracle Developer Tools for Visual Studio. An Oracle White Paper January 2008

Specify the location of an HTML control stored in the application repository. See Using the XPath search method, page 2.

Online shopping store

2009 Braton Groupe sarl, All rights reserved.

Kaseya 2. Quick Start Guide. for VSA 6.3

Infinite Campus Ad Hoc Reporting Basics

J a v a Quiz (Unit 3, Test 0 Practice)

Trial version of GADD Dashboards Builder

Accessing Your Database with JMP 10 JMP Discovery Conference 2012 Brian Corcoran SAS Institute

Install MS SQL Server 2012 Express Edition

Composite.Community.Newsletter - User Guide

Organizing and Managing

INTEGRATING MICROSOFT DYNAMICS CRM WITH SIMEGO DS3

BRIO QUERY FUNCTIONALITY IN COMPARISION TO CRYSTAL REPORTS

Spring,2015. Apache Hive BY NATIA MAMAIASHVILI, LASHA AMASHUKELI & ALEKO CHAKHVASHVILI SUPERVAIZOR: PROF. NODAR MOMTSELIDZE

ORACLE BUSINESS INTELLIGENCE WORKSHOP

Advanced Query for Query Developers

IBM Campaign and IBM Silverpop Engage Version 1 Release 2 August 31, Integration Guide IBM

Talking to Databases: SQL for Designers

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping

EXCEL IMPORT user guide

MyOra 3.0. User Guide. SQL Tool for Oracle. Jayam Systems, LLC

SQL Server for developers. murach's TRAINING & REFERENCE. Bryan Syverson. Mike Murach & Associates, Inc. Joel Murach

Monitoring PostgreSQL database with Verax NMS

Administration GUIDE. SharePoint Server idataagent. Published On: 11/19/2013 V10 Service Pack 4A Page 1 of 201

ENABLE LOGON/LOGOFF AUDITING

Cloudera Certified Developer for Apache Hadoop

Catalog Web service and catalog commerce management center customization

What's New In DITA CMS 4.0

for Sage 100 ERP Business Insights Overview Document

Intelligent Event Processer (IEP) Tutorial Detection of Insider Stock Trading

About This Document 3. About the Migration Process 4. Requirements and Prerequisites 5. Requirements... 5 Prerequisites... 5

Developing SQL and PL/SQL with JDeveloper

TestTrack Test Case Management Quick Start Guide

Programming Database lectures for mathema

Developing coaches in human services

Setup Forms Based Authentication Under SharePoint 2010

Course Title: Reporting in Microsoft Dynamics CRM 2011

FileMaker Server 11. FileMaker Server Help

2015 OSIsoft TechCon. Optimizing SQL Queries for Performance using PI OLEDB Enterprise

IBM Campaign Version-independent Integration with IBM Engage Version 1 Release 3 April 8, Integration Guide IBM

The Welcome screen displays each time you log on to PaymentNet; it serves as your starting point or home screen.

Access Queries (Office 2003)

Transcription:

Supporting Data Set Joins in BIRT Design Specification Draft 1: Feb 13, 2006 Abstract This is the design specification of the BIRT Data Set Join feature. Document Revisions Version Date Description of Changes Draft 1 Feb 13, 2005 First draft Draft 2 Feb 22, 2005 Second draft Draft 3 Mar 23, 2005 Third draft - 1 -

Contents 1. Introduction...3 2. Features and Requirements...3 2.1 Supported Features...3 2.1.1 Heterogeneous and Homogeneous Data Set Joins...3 2.1.2 Inner and Outer Joins...3 2.1.3 Using Joint Data Set...3 2.2 Limitations in 2.1...3 2.2.1 Joint Data Set Limited to Two tables...3 2.2.2 Single Column Equality Joint Condition...3 2.3 Features for Future Consideration...4 2.3.1 Data Set Unions...4 3. Creating Joint Data Set in BIRT Designer...4 3.1 Menu Option to Create New Joint Data Set...4 3.2 Joint Data Set Wizard...4 3.3 Joint Data Set Editor...5 4. Using a Joint Data Set in BIRT Designer...5 4.1 Data Set Parameters...6 4.2 Output Columns...6 4.3 Scripts...6 5. ROM and Model API Enhancements...6 5.1 Rules to support joint data set...6 5.2 Snippet of design file...6 5.3 ROM Definition...7 5.4 Model API...8 5.4.1 JointDataset ( org.eclipse.report.element):...8 5.4.2 JointCondition:...9 5.4.3 JointDatasetHandle...9 5.4.4 JointConditionHandle:...9 6. Data Engine API Enhancements...9 6.1 Package org.eclipse.birt.data.engine.api...9 6.1.1 Interface IJointDataSetDesign...9 6.1.2 Interface IJointConditionalExpression....10 6.2 Package org.eclipse.birt.data.engine.api.querydefn...11 6.2.1 Class JointDataSetDesign...11-2 -

1. Introduction It is a commonly requested feature that a BIRT table/list be able to consume data from two or more data sets joined together with a set of join conditions. This feature is very similar to SQL table joins. In fact SQL terminologies are used throughout this specification to define the data set join feature, and the reader of this document is assumed to be familiar with SQL. In comparing BIRT s data set join to SQL joins, a BIRT data set is equivalent to a SQL table, while a data set column is equivalent to a SQL column. Data set joins in BIRT 2.1 is achieved via the introduction of a new type of data set called Joint Data Set. A Joint Data Set is a derived data set whose data comes from joining two data sets. 2. Features and Requirements 2.1 Supported Features 2.1.1 Heterogeneous and Homogeneous Data Set Joins Data sets involved in a join can be of any data source type. For example, a JDBC data set may be joined to another JDBC data set, or a Scripted Data Set may be joined to an XML data set. A joint data set may also be joined to other data sets. A data set may be joined to itself (self-join). 2.1.2 Inner and Outer Joins Inner join and outer join are supported as join types. 2.1.3 Using Joint Data Set A Joint Data Set may be used wherever a data set may be used, including list, table, data elements etc. A Joint Data Set may have its own computed columns and filters. A Joint Data Set cannot have its own parameters (instead it automatically inherits parameters from the data sets used to define it). 2.2 Limitations in 2.1 The follow limitations apply to the data set joins in BIRT 2.1 2.2.1 Joint Data Set Limited to Two tables A Joint Data Set may only join two tables. It is however still possible to produce multidata set joins by chaining joint data sets, since a joint data set may be used to define another joint data set 2.2.2 Single Column Equality Joint Condition A Joint Data Set may only define a single joint condition between the two tables. Such a joint condition can only be an equality comparison of two data set columns, one from - 3 -

each data set. To illustrate, suppose that data set D1 (which has result set column c1, a1) is joined to data set D2 (which has result set column c2, a2), then row[ c1 ] == row[ c2 ] is a valid join condition row[ c1 ] >= row[ c2 ] is not a valid join condition (not an equality comparison) row[ c1 ] *2 == row[ c2 ] is not a valid join condition (must join on columns, not expressions; consider creating a computed column on D1 if such a join condition must be used) row[ c1 ] == row[ a1 ] is not a valid join condition (both columns are from one data set) row[ c1 ] == row[ c2 ] && row[ a1 ] == row[ a2 ] is not a valid join condition (more than one comparison is included; if such a join condition must be used, consider create computed columns to combine the values of multiple columns in the join key to a single value) 2.3 Features for Future Consideration 2.3.1 Data Set Unions Joint data set may be expanded to produce a union of two or more data sets. 3. Creating Joint Data Set in BIRT Designer 3.1 Menu Option to Create New Joint Data Set In BIRT Designer s Data menu, a new item, New Joint Data Set will be added. This menu item will also be added to the menu when the user right clicks on the Data Sets node in the Data Explorer view (next to the existing menu item New Data Set ). Selecting New Joint Data Set menu item will cause the Joint Data Set Wizard to be brought up. 3.2 Joint Data Set Wizard The Joint Data Set Wizard helps a user create a new joint data set. In this wizard the user chooses (1) Two data sets (note that they can be the same data set) to join - 4 -

(2) One column from each data set to define the equality join condition (3) A join type (inner, left outer or right outer; inner join is the default) The next diagram is a rough mockup of the wizard dialog. The wizard may choose to implement a series of dialogs (e.g., the first dialog picks the table, the 2 nd dialog picks the join columns and join type etc.) Upon finishing the Joint Data Set wizard, the regular Data Set Editor dialog is brought up so that the user can define filters and computed columns on the joint data set. 3.3 Joint Data Set Editor When the Edit action is selected for a joint data set, the Joint Data Set Editor is brought up. This editor dialog is similar to the editor of a regular ODA data set, with these exceptions: (1) There is no Query or Data Source tab (A joint data set is not associated with a data source) (2) There is no Property Binding tab ( joint data set does not have properties) (3) There is no Cache Preference tab ( we do not plan to cache a joint data set result ) 4. Using a Joint Data Set in BIRT Designer A joint data set can be used wherever a data set is accepted. However a joint data set has some special characteristics due to the derivative nature of its data and metadata. - 5 -

4.1 Data Set Parameters A joint data set combines the parameters (both input and output) of the two data sets that it joins. In the Joint Data Set Editor, the user may view the list of combined parameters. However the user may not add, remove or modify any parameter. If the two joined data sets have parameters with identical names, a name clash will occur. BIRT designer will report this as an error. The user should rename the ambiguous parameter in one of the originating data sets to resolve the ambiguity. 4.2 Output Columns A joint data set combines the output columns of the two data sets that it joins. In the Joint Data Set Editor, the user may view the list of combined output columns. However the user may not modify the definition of any column. If the two joined data sets have columns with identical name, a ROM expression which refers to a column by that name will result in ambiguity. In order to resolve such ambiguity, a result set column of a joint data set may be identified by name DataSetName::ColumnName. For example, if data sets D1 and D2 are joined to produce a joint data set J, a table which binds to data set J may contain the following expressions: row[ col ] row[ D1::col ] Both expressions are valid references to the value of column col in D1. However if data set D2 also has a column named col, expression row[ col ] is an ambiguous reference and may produce undefined results. 4.3 Scripts Joint data set does not support event scripts. 5. ROM and Model API Enhancements 5.1 Rules to support joint data set The source data sets are input by the sequence they are used. Joint conditions are between the adjacent data sets and the columns of the join condition are from the adjacent data sets. Joint conditions are single conditions, the comparison operation between the columns can be equality or others. (Multiple conditions can be supported by multiple single conditions, which won t be supported in 2.1 M5) 5.2 Snippet of design file <joint-dataset> - 6 -

<property-list name= source-datasets > <property name= dataset >dataset1</property> <property name= dataset >dataset2</property>.. </property-list > < list-property name= joint-conditions > <structure name= join-condition > <property name= jointtype >inner</property> <property name= jointoperator >eq</property> <property name= leftdataset >leftdataset</property> <property name= rightdataset >rightdataset</property> <property name= leftexpression >leftexpression </property> <property name= rightexpression >rightexpression </property> </structure> </list-property> </joint-dataset> 5.3 ROM Definition <ChoiceType name="jointtype"> <Choice displaynameid="choices.jointtype.inner" name="inner"/> <Choice displaynameid="choices.jointtype.leftout" name="left-out"/> <Choice displaynameid="choices.jointtype.rightout" name="right-out"/> </ChoiceType> <ChoiceType name="jointoperator"> <Choice displaynameid="choices.jointoperator.equal" name="eq"/> </ChoiceType> <Element allowsuserproperties="true" canextend="true" displaynameid="element.jointdataset" extends="reportelement" hasstyle="false" isabstract="false" isnamerequired="true" javaclass="org.eclipse.birt.report.model.elements.jointdataset" name="jointdataset" namespace="dataset" since="2.1" xmlname="joint-dataset"> <Property subtype="element" detailtype="dataset" displaynameid="element.jointdataset.sourcedatasets" name="sourcedatasets" runtimesettable="true" since="2.1" type="list"/> - 7 -

<Property detailtype="jointcondition" displaynameid="element.jointdataset.jointcondition" islist="true" name="jointconditions" runtimesettable="true" since="2.1" type="structure"/> </Element> <Structure displaynameid="structure.jointcondition" name="jointcondition" since="2.1"> <Member detailtype="jointtype" displaynameid="structure.jointcondition.jointtype" isintrinsic="true" name="jointtype" runtimesettable="true" since="2.1" type="choice"> <Default>inner</Default> </Member> <Member detailtype="jointoperator" displaynameid="structure.joinycondition.jointoperator" isintrinsic="true" name="jointoperator" runtimesettable="true" since="2.1" type="choice"> <Default>eq</Default> </Member> <Member displaynameid="structure.jointcondition.leftdataset" isintrinsic="true" name="leftdataset" runtimesettable="true" since="2.1" type="string" valuerequired="true"/> <Member displaynameid="structure.jointcondition.rightdataset" isintrinsic="true" name="rightdataset" runtimesettable="true" since="2.1" type="string" valuerequired="true"/> <Member displaynameid="structure.jointcondition.leftexpression" isintrinsic="true" name="leftexpression" returntype="any" runtimesettable="true" since="2.1" type="expression" valuerequired="true"/> <Member displaynameid="structure.jointcondition.rightexpression" isintrinsic="true" name="rightexpression" returntype="any" runtimesettable="true" since="2.1" type="expression" valuerequired="true"/> </Structure> 5.4 Model API JointDataset and JointCondition are main elements need to be added into model. As before a respective handle will be provided for each element, which is the public API for other modules to use these elements. In this case, the handles are JointDatasetHandle and JointConditionHandle. Followed are the detailed APIs for the new added components in Model. 5.4.1 JointDataset ( org.eclipse.report.element): No special API in JointDataSet. - 8 -

5.4.2 JointCondition: Methods: String getjointtype() String getoperator(); String getleftdataset(); String getrightdataset(); String getleftexpression(); String getrightexpression(); void setjointtype(string jointtype); void setoperator(string operator); void setleftdataset(string datasetname); void setrightdataset(string datasetname); void setleftexpression(string expression); void setrightexpression(string expression); 5.4.3 JointDatasetHandle List getdatasetnames(); void adddataset(string datasetname); Iterator jointconditionsiterator( ) 5.4.4 JointConditionHandle: Interfaces of JointCondition are same as those of JointConditon. 6. Data Engine API Enhancements The following interfaces/classes are to be added to Data Engine API to accommodate new requirements. 6.1 Package org.eclipse.birt.data.engine.api 6.1.1 Interface IJointDataSetDesign. This interface describes the static design of a Joint Data Set. It extends interface org.eclipse.birt.data.engine.api.ibasedatasetdesign. The following table lists the static constants of this interface. Constant Signature Description - 9 -

public static int LEFT_OUTER_JOIN = 1 public static int RIGHT_OUTER_JOIN = 2 public static int INNER_JOIN = 0 The integer value stands for a left outer join operator. The integer value stands for a right outer join operator. The integer value stands for an inner join operation. The following table lists the method of this interface. Method Signature public String getleftdatasetdesign() public String getrightdatasetdesign() public int getjointtype() public getjointconditions() List Description This method returns the name of data set design which servers as left operand of a joint. This method returns the name of data set design which servers as right operand of a joint. This method returns the Joint Type. There are three types of Joints. They are inner joints, left outer join, right outer join. Their corresponding integer values are defined in this interface as well. This method returns the Joint conditions. Only rows which can make these IJointConditionalExpression instance evaluate to true will be jointed. 6.1.2 Interface IJoinCondition. This interface describes a specified conditional expression which returns a Boolean value, and used for Joint Data Set only. The following table lists the static constants of this interface. Constant Signature public static int OP_EQ = 1 Description The integer value stands for an equality operator. It is evaluated to true if the result of first expression is equal to that of second expression. The following table lists the method of this interface. Method Signature public IScriptExpression getleftexpression() public Description This method returns the IScriptExpression instance which will be evaluated against the data set which servers as left operand of a joint. IScriptExpression This method returns the IScriptExpression instance - 10 -

getrightexpression() public int getoperator() which will be evaluated against the data set which servers as right operand of a joint. This method returns the integer standing for a compare operator. All supported compare operators are defined in this interface. 6.2 Package org.eclipse.birt.data.engine.api.querydefn 6.2.1 Class JointDataSetDesign. This class extends org.eclispe.birt.data.engine.querydefn.basedatasetdesign, and implements org.eclipse.birt.data.engine.api.ijointdatasetdesign. It is a default implementation of latter. - 11 -