Skip to main content

Create datasource in the OPNBI

  • In this document you will learn the concept of Data source, you will create a new data source.

  • In this exercise you will also learn to create datasets from how to connect to different kind of data sources as well as used data source to create different data sets.

Create Datasource in OPNBI.

Create datasource: From Create Datasource tutorial you will learn to create datasource in OPNBI.

Create Datasource and connect with MySQL database.

Connect datasource MySQL: From this MySQL Datasource tutorial you will learn to connect datasource with MySQL datasource in OPNBI.

Create Datasource and connect with PostgreSQL database.

Connect datasource PostgreSQL: From this PostgreSQL Datasource tutorial you will learn to connect datasource with PostgreSQL datasource in OPNBI.

Create Datasource and connect with Google BigQuery.

Connect datasource BigQuery: From this BigQuery Datasource tutorial you will learn to connect datasource with BigQuery datasource in OPNBI.

In order to create the datasource follow these steps:-

There are two ways in which a user can create a datasource in the OPNBI application.

  1. By clicking on the create icon Docusaurus Slash Introduction on the bottom most toolbar.

  2. By right clicking on any existing datasource as follows:-

    Docusaurus Slash Introduction

  3. Click on the Create Datasource using any of the methods above which will open the dialog box as shown below:-

    Docusaurus Slash Introduction

  4. Here, we are creating a datasource named OPNBIPostgres Data which will store data related to the OPNBI and hence the display name.

5. Wiat Time:-

  • It is amount of time the user (the code requesting a connection) will wait before getting a connection timeout. To improve performance set Max Wait Time to zero. This essentially blocks the usrr thread until a connection becomes available & allows the server to alleviate the task of tracking the elapsed wait time for each request and increases performance.

  • For this example; Keep Wait TIme is 0.

6. JNDI:-

  • JNDI is the acronym for the Java Naming and Directory Interface API. By making calls to this API, applications locate resources and other program objects. A resource is a program object that provides connections to systems, such as database servers and messaging systems.

  • For this example; keep JNDI it False.

  1. As we are connecting JDBC with PostgreSQL org.postgresql.Driver driver is used to connect.

8. Driver:-

  • A JDBC driver uses the JDBC™ (Java Database Connectivity) API developed by Sun Microsystems, now part of Oracle, that provides a standard way to access data using the Java™ programming language. Using JDBC, an application can access a variety of databases and run on any platform with a Java Virtual Machine. Using JDBC allows you to write one application that can send SQL statements to different data sources. SQL is the standard language for accessing relational databases.

9. Connection URL:-

  • A database connection URL is a string that your DBMS JDBC driver uses to connect to a database & provides a way of identifying a database so that the appropriate driver recognizes it and connects to it. It can contain information such as where to search for the database, the name of the database to connect to, and configuration properties.

  • For this example; connection url is jdbc:postgresql://localhost:5432/OPNBI

10. Password & Username:-

  • A password is used by the system to connect to its database.

  • A Username is unique identifier used to gain access to a computer, network, or a system.

  • For this example; The Username is root and password is password to connect to theyar server.

11. Extra Configuration

  • User may find extra configuration property while creating datasource such as MySQL or MSSQL.

  • If user required to pass some extra configuration at the end of the connection URL, user need to pass this configurations in Extra Configuration property inside {}.

  • A succession of global properties applying to all hosts, preceded by ? and written as key=value pairs separated by the symbol “&.” Here are some examples:

jdbc:mysql://(host=myhost1,port=1111)/db?key1=value1&key2=value2&key3=value3

The following are true for the key-value pairs:

key and value are just strings. Proper type conversion and validation are performed internally in Connector/J.

key is case-sensitive. Two keys differing in case only are considered conflicting, and it is uncertain which one will be used.

Any host-specific values specified with key-value pairs as explained in Single host with host-specific properties and Multiple hosts above override the global values set here.

  1. After that test connection, if it is successful click on save else click cancel button.

  2. While saving the database, you will be given an option to create a dataset as well.

    Docusaurus Slash Introduction

  3. Accept if you want to create a DataSet right now or decline for later.

  4. You have successfully created a datasource in the OPNBI application.

  5. In case of any further help, the user can click on the Docusaurus Slash Introduction icon to access the OPNBI help documents.

  6. If the user is not satisfied and wants to cancel the create request, he can do this by clicking on the cancel button next to save or by clicking on Docusaurus Slash Introduction button next to the Docusaurus Slash Introduction icon.

In this manner, you can create a datasource in the OPNBI application.

More features of Datasource as follows:-

Datasource introduction

Edit Datasource

Delete Datasource

More features of Masterdata as follows:-

Create datasource mapping

Create Dataset

Create Parameter