For any Data warehouse project, the most important aspect is to handle data properly. To handle data, first condition is that there must be some existing data. Teradata Data Generator helps in generating data for testing purpose for Teradata Database. Generally we manually cook few records in our database in order to test our code. However we will see if the requirement is to generate more than a million records then how Teradata Data Generator may automate the process and helps you in saving lot of time.
Teradata Data Generator Overview
Data Generator is a tool with Java as front-end and Teradata as backend. It can be generalized to include more Databases like Oracle, DB2 etc. The user has to give login credentials in order to establish connection to the database. Once the connection is successful, user is asked how many rows to generate. The Data Generator will generate that many rows.
Basic Flow of Teradata Data Generator
Data Generator flow can be explained using the figure below:
The user gives Connection Details and connection is established using Java JDBC. The Table metadata is fetched by querying Teradata and columns details are fetched like corresponding data type and maximum length. The data is generated using java code and is saved in a datafile.The data is displayed as well as option for downloading file is available for user. User can also insert the generated data directly to the table using Data Generator Tool. Also, user can easily import the data into Table by setting desirable delimiter and Import Data feature.
Few key features and benefits of Teradata Data Generator Tool are:
1. Data Generation: The tool can generate millions of records depending on the memory of the system.
2. Accurate Data Type: The tool makes sure that whatever data it is generating is of proper data type and in accordance with the maximum length for any column.
3. Referential Integrity: Data can also be generated in accordance with the foreign key constraints on table.
4. Data Store: Data once generated is not lost even if the tool is closed. The Data Generator tool lets the user download all the data generated into a single file with semi-colon as delimiter used for separating columns data.
5. Data Manipulation: Data Generated will be displayed in a tabular format. User can easily edit the random data generated as per his requirement.
6. Data Insertion: Data generated, whether random data or as per foreign key constraint can be inserted into the table directly from Data Generator Tool.
7. Easy Import: The data generated and saved in a file can be easily imported into Teradata by using Teradata’s Import Data utility.
8. Flexible Delimiters: Users can specify from the list of Delimiters for his data file to be generated or the external data file for preview.
9. Preview Data File: External Data File can be viewed efficiently using Preview option at Home Screen in Data Generator Tool.
Data Types Supported
Data Generator Tool supports various Data Types and can be easily modified to include other data types also. It supports following Data Types.
TIMESTAMP: (TIMESTAMP (0) TO TIMESTAMP (6))
TIME: (TIME (0) TO TIME (6))
Data Generator Test Methodology
The first screen which users see is shown below:
The user gives the login credentials and can test for the connection status.
For testing connection user can give Server IP, username and password and click Test button. If connection is successful, success message is displayed else failure message. Once the user submits details including Database name and Table name for which Data needs to be generated, he is asked for number of rows to be generated. Given the number of rows to generate, the Data Generator Tool will generate data as per requirement. If at the beginning Referential Integrity is set to Yes, the tool will fetch data from corresponding column of Parent Table.
See the snapshot below:
The user can insert the generated or edited record using Insert feature of Data Generator tool which uses BTEQ insert.
The user can download the Generated data using the download button.
And can import the data into Teradata using import Data feature of Teradata.
For generating data again for the same table click on refresh button and give number of records to generate.
Also not much manual intervention is required while generating data or inserting data or importing data into Teradata.User can continue doing his job while the Data Generator Tool is working in backend.
If you want to preview data in some external file, you can preview data by clicking the preview button at Home screen and select the proper delimiter for data file. Click preview button and select the data file. The data in the file will be presented in tabular format which you can easily view and edit.
The Data Generator tool is a tool which helps in generating any number of records for given database and table name. It helps in saving lots of time by generating data and also allowing user to save the data file generated. The tool is easy to use and maintain and can be modified easily to work in different environment.
If you want to use this tool for non-commercial purpose or you have any query regarding this tool , feel free to comment here.