Create Datasource
Overview
In this document, you will learn the concept of a Datasource and the process of creating a new datasource within the AIV platform.
Additionally, you will explore how to create datasets, establish connections to various types of data sources, and leverage these data sources to build diverse datasets for analysis and reporting.
Create Datasource in AIV: In this tutorial, you will learn how to create a datasource in AIV.
Create a Datasource and Connect with a 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 a datasource in the AIV application, follow these steps:
-
Click the
button located on the bottom toolbar.
-
After clicking the Create button, the Connect to Datasource page will open, as shown below:
-
In this example, we are creating a datasource named Sample SQL to store information related to AIV, including the display name. When we select MySQL, the Database Connection dialog box appear, as shown below.
Wait Time Configuration
The Wait Time refers to the duration a user (or the code requesting a connection) will wait before encountering a connection timeout. To optimize performance, set the Max Wait Time to zero. This configuration will pause the user thread until a connection becomes available, relieving the server from tracking the elapsed wait time for each request, thus 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 icon to access AIV help documents.
Cancelling the Datasource Creation
If you want to cancel the datasource creation, click the button next to save, or use the button next to the
icon.
In this manner, you can create a datasource in the AIV application.
More features of Datasource as follows:
Datasource Introduction
Edit Datasource
Delete Datasource
Custom Datasource
Data EndPoints Datasource
More features of Master Data as follows:
Create Datasource Mapping
Create Dataset
Group Dataset
Create Parameter
Create Pipeline