Create Datasource
In this document, you will learn the concept of Datasource and how to create a new datasource in AIV.
You will also learn how to create datasets, connect to different types of data sources, and use these data sources to create various datasets.
Create Datasource
In this tutorial, you will learn how to create a datasource in AIV.
Create Datasource and Connect with MySQL Database
In this tutorial, you will learn how to connect a datasource to a MySQL database in AIV.
Create a Datasource and Connect with a PostgreSQL Database
In this tutorial, you will learn how to connect a datasource to a PostgreSQL database in AIV.
Create a Datasource and Connect with Google BigQuery
In this tutorial, you will learn how to connect a datasource to BigQuery in AIV.
To create the datasource, follow these steps:
There are two ways to create a datasource in the AIV application.
Method 1: Using the Create Icon on the Bottom Toolbar:
Click on the create button located on the bottom toolbar.
Method 2: Right-click on any existing datasource as shown below:
Right-click on any existing datasource and select the appropriate option.
Opening the Create Datasource Dialog Box
Click on ‘Create Datasource’ using any of the methods above, which will open the dialog box shown below:
In this example, we are creating a datasource named “Sample Jira” to store information related to AIV, including the display name. When we select MySQL or PostgreSQL, the Database Connection dialog box appears as shown below.
Wait Time Configuration
The “Wait Time” refers to the duration a user (the code requesting a connection) will wait before experiencing a connection timeout. To enhance performance, set Max Wait Time to zero. This action essentially pauses the user thread until a connection becomes available, relieving the server from tracking the elapsed wait time for each request and improving overall performance.
For this example, set the Wait Time to 0.
JNDI Configuration
JNDI (Java Naming and Directory Interface API) allows applications to locate resources and other program objects by making calls to this API. Resources can include connections to systems such as database servers and messaging systems.
For this example, keep JNDI set to False.
JDBC Driver Configuration
JDBC (Java Database Connectivity) is a Java-based API developed by Sun Microsystems (now part of Oracle) that provides a standardized interface for connecting and interacting with databases.
Key Points:
- Standardized Access: JDBC offers a standardized way for Java applications to connect to various databases, providing a uniform interface regardless of the underlying database management system (DBMS).
- Cross-Platform Compatibility: Java’s “Write Once, Run Anywhere” principle extends to database connectivity, allowing applications to run on any platform with a Java Virtual Machine (JVM).
- Database Agnosticism: JDBC enables applications to seamlessly connect to different types of databases (e.g., MySQL, Oracle, PostgreSQL) without modifying the application code.
- SQL Statements: JDBC allows developers to send SQL (Structured Query Language) statements to connected databases for managing and querying relational data.
- Connection Pooling: JDBC supports connection pooling, enhancing efficiency and performance in database interactions.
- Transaction Management: JDBC provides facilities for managing database transactions, ensuring data consistency and integrity.
- Exception Handling: JDBC includes mechanisms for handling database-related exceptions, allowing for graceful error management within Java applications.
Connection URL Configuration
A database connection URL is a string that the DBMS JDBC driver uses to connect to a database. It contains information like the location of the database, the database name, and configuration properties.
For this example, the connection URL is: jdbc:postgresql://localhost:5432/aiv
Username and Password Configuration
- Password: A password is used by the system to connect to its database.
- Username: A Username is a unique identifier used to gain access to a computer, network, or system.
For this example, the Username is root
and the password is password
to connect to the server.
Final Steps: Testing and Saving the Connection
-
After entering all the required information, test the connection. If successful, click on “Save.” If not, click “Cancel.”
-
Upon saving the database, you will be given an option to create a dataset immediately.
-
Accept if you want to create a dataset now, or decline to create it later.
-
You have successfully created a datasource in the AIV application.
Accessing Help
If you need further assistance, click on the help icon to access AIV help documents.
Cancelling the Datasource Creation
If you want to cancel the datasource creation, click the cancel button next to save, or use the button next to the help icon.
In this manner, you can create a datasource in the AIV application.
Explore more features of Datasource:
Datasource Introduction
Edit Datasource
Delete Datasource