Skip to main content

How to Create Dataset using Union

What is Union?

  • The Union operator combines the results of two or more queries into a distinct single result set that includes all the rows that belong to all queries in the Union. It allows you to write two separate SELECT statements, and to have the results of one statement display in the same table as the results from the other statement.

  • It removes duplicate rows between the various SELECT statements. Each SELECT statement within the UNION must have the same number of fields in the result sets with similar data types.

  • Each SELECT statement within the UNION must have the same number of fields in the result sets with similar data types.

Objectives

  • Create Dataset using Union.

Prerequisites

  • For this example we are using Sales.ds & Order Details.ds

Download join.jar file from link given join.zip

  • After downloading the jar file, add Sales.ds from zip into the OPNBI. To add it into OPNBI follow this Link

Skill Level Required

  • Basic knowledge of Union Operator & SQL.
info

To know more about Union Operator in detail Click here

  1. Log in to OPNBI using your respective credentials.

  2. Go to Hamburger Menu Docusaurus Slash Introduction > MasterData > Dataset.

  3. To know more in details about Dataset Section Click here .

  4. User can create dataset using 2 options:-

I. From the footer menu &
II. From the context menu

  1. Click on Create Dataset option & your screen will look as per below image.

    Docusaurus Slash Introduction

Note

To know more about terminology of General tab Click here

  1. Enter the details in Dataset window as per below:-
  • Name: New Dataset
  • Datasource: Union
  • Datasets: Sales.ds
  • Dataset Columns: Select country, orderDate, productCode, quantityOrdered, productName, extendedPrice..

Docusaurus Slash Introduction

  • Select another Datset from the Dataset box as given below:
  • Datasets: Order Details.ds
  • Dataset Columns: select ORDERNUMBER, ORDERDATE, SHIPPEDDATE, STATUS & CUSTOMERNUMBER..

Docusaurus Slash Introduction

Note

User can select multiple dataset as requied.

  • Click on Preview button to see the Dataset preview.

    Docusaurus Slash Introduction

  • Scroll the Horizontal & Vertical Scrollbar to see the merged preview data of both dataset that are selected.

    Docusaurus Slash Introduction

  • It will create a combination of both dataset & create a new dataset.

  • Create on Submit button & dataset will be created.