Generate Data Fast with Oracle APEX Data Generator
A Must For Developers, Testers & Analysts In Your Organization

Search for a command to run...
A Must For Developers, Testers & Analysts In Your Organization

Great blog post, Sandra! I have a little hack for you. If you want to re-sequence a column, just right click on the "read only" sequence number and remove readonly="true". Supported? Definitely not, but it works just fine :)
Also, you should be able to generate directly into tables even if you create a blueprint from scratch. You just need to make sure the table names, columns, constraints, etc. all work.
Thanks Anton for visiting and reading my blog and for your comments too. I appreciate the hack and I retested the feature to generate directly into tables and yes, as long as the table name on your blueprint is an exact match to the table name in your schema, it works. I've updated the blog with this tip. Thanks again!
sssuarez Just one more tip...OADG is accessible via APIs (note: I wasn't able to post links, so I put a space between https:// and the rest of the URL): https:// docs.oracle.com/en/database/oracle/apex/22.1/aeapi/APEX_DG_DATA_GEN.html In particular, if you want to generate data into just one table, you can use APEX_DG_DATA_GEN.GENERATE_DATA https:// docs.oracle.com/en/database/oracle/apex/22.1/aeapi/GENERATE_DATA-Procedure-Signature-1.html
Use p_blueprint_table to specify the table name.
How to Catch Intercompany Errors Before Consolidation

Oracle's consignment solution, across EBS 11i, R12, and even Fusion Cloud, only covers the buy side. Here's how we designed a complete sell-side consignment process using standard EBS transactions. I

And how clean ERP Data, APEX + SQL Solve It - in Seconds, Not Days

3 Ways to Future-Proof Oracle APEX and other low-code Apps

Streamline your ERP rollout by identifying which systems to retire, replace, or retain - before they slow you down.

A high-quality application relies on thorough testing. Generating sample data fast is vital for keeping up with today's world of Agile and condensed timelines. Traditional methods for generating data have too many downfalls: manual manipulation of production data is slow and error-prone and 3rd party tools, require a fee-based model or if free, a compromise in features and support.
Enter Oracle APEX Data Generator (OADG), a SQL Workshop utility tool available in Release 22.1 (May 2022). It generates large volumes of data for you, in the millions, in multiple formats (CSV, JSON, SQL) utilizing a vast library of data types. Its simple UI and workflow, along with its price (it's free!), make it an all-around winner over the multitude of alternatives out there.
Continue reading to discover why I think OADG is great, why you should use it over other options and how to set up and use it. I've also thrown a section on hints and tips I picked up along the way along with features I would ❤️ to see in the future.
The new tool is feature-rich, compared to the alternatives, both free and paid. And it's just in its first version. Its features include:
Provides a vast library of data types to generate sample data including date and time, integers, boolean, products, persons, plants, food, cars, animals, etc. And for each data type, a series of attributes are available to provide context to your data. For example,

APEX makes the sample data types and their respective values available to query via the the GET_EXAMPLE function. For example, the query below will generate all cities available for the data type "airport":
select *
from apex_dg_data_gen.get_example
(p_friendly_name => 'airport.city', p_rows => 100);
The p_friendly_name variable may be found in the app declaratively:

I downloaded the APEX 22.1 Install and found the script that generates all the data types, attributes and values. You can view all sample data here.
TLDR - Because it saves time. Testers no longer have to search or wait for data.
Oracle ERP, APEX and other app implementations typically require a combination of the following for testing:
OADG allows your team to bypass all these concerns, and what's more, it's free, fast and easy to use.
A quick note on reusing Production Data - relying on production data introduces risk as this data typically represents 'perfect' data that has already been vetted. To thoroughly test your new app, integration or business logic, your test data needs exceptions, anomalies, negative outliers and other invalid data to rigorously prove out your app and any ETL routines.
Be a hero and provide them OADG!
Tip: Data Generation tools are typically not applicable for ML use cases as you do not want to feed algorithms randomly-generated data. You need some data correlation across your columns so your algorithm can learn.
The best way to illustrate this feature is through an example. We'll use a simple Product table with a relational dependency to the Product Categories table:

Here's a visual of the workflow for data generation:

As depicted in the workflow above, the first step to generating data is to capture the definition of your tables and columns via a Blueprint, a template-like object which stores the settings, transformation rules and data sources for your columns.
OADG provides three methods for creating a blueprint. A wizard-like flow guides you through each method, as screenshot illustrates below.
Navigation: SQL Workshop > Utilities > Data Generator

There are benefits to each method:
Use Existing Tables - this option provides you with two big features: 1) it auto-generates your blueprint based on your table's definition, and 2) if you choose, it will automatically load the generated sample data directly into your existing table.
From Scratch - this option provides you ultimate flexibility in the sequence of your table(s) and column(s) and will provide you generated data in a CSV, JSON or SQL file.
Import JSON File - this option serves as my ultimate 'edit' recourse. I typically generate a blueprint from scratch or from an existing table and if I need to edit the sequence of a table or column, I export it as a JSON, make the edits I need, and then reimport it with this option.
This is where you define the data you want to generate and how to transform it. Once you have defined your table(s) and column(s) with guidance from the wizard in step 1 above, click on your first column to display its Column and Data Source regions, as illustrated in screenshot below.
NOTE: I have uploaded my blueprint's JSON here in case you'd like to follow along.

OADG makes available six data sources, providing almost unlimited flexibility for data transformation.

Let's see each of these in action below.
This option allows the relational dependency (foreign-key) between tables. For my use case, I need to reference the CATEGORY_ID from the PRODUCT_CATEGORY table to the CATEGORY_ID in my PRODUCT table.

Tip: this option is only displayed if you have if you have more than one table defined in your blueprint. If you need to reference Table A.Column A's values for your Table B.Column B, ensure you define Table A and its columns before defining Table B in the Blueprint. This feature is sequence-dependent and will force you to redesign the sequence of your tables if they are not in the right order.
Select this option if the data generator needs to randomly assign values from your own provided data. Simply create a custom data source by selecting the hamburger bar as shown below:

For my example, I uploaded a CSV file with 1000+ retail brands using the Data Workshop utility. These values will serve as sample data for the BRAND column.

NOTE: The RETAIL_BRANDS.xlsx file I use in this example is available here.
This source option allows you to use any of the pre-seeded data types. I found myself running the "friendly_name" script provided in the "Why It's Great" section above a number of times to get me familiar with the data and its boundless possibilities.
I chose the Built-In option for five columns: CATEGORY_NAME, PRODUCT_NAME, COST, LAUNCH_DATE and ACTIVE. Here is a pic of the LAUNCH_DATE and ACTIVE column settings. Check out the convenience the "Date Between Min and Max" data type provides:

Other "Date" and "Boolean" options include the following:

This is a very handy option for when you have a manageable list of pre-defined values. Instead of having to load your custom data to a table, you simply list out your values in a table provided by this option. For my use case, I defined four values for the UOM column. See screenshot below.

Note the "Frequency" column above, which allows me to indicate the occurrence of one value compared to the others in a generated data set. Neat!
And Note the "Multi Value Options" fields as displayed in the screenshot below. It allows you to generate multiple values for a column. For this specific screenshot, I have instructed OADG to assign up to three values for the UOM column with a comma as my delimiter.

As the name applies, this option will generate a numeric sequence for your column. It lets you specify the starting sequence number as well as the incremental value. I use this for both my CATEGORY_ID and PRODUCT_ID columns.

This one is my favorite because it's powerful and provides so much flexibility. It allows you to apply just about any function to transform built-in or custom data. You can apply a substring function to limit size of values, DBMS_RANDOM or CASE to derive values based on dependencies with other columns, as shown in the screenshot below:

Did you catch the Required flag setting on the screenshot above? If you set a column to not Required, you can indicate the percentage of values you'd like to be set as Null.
This was a quick overview of the six data sources available. You will spend the bulk of your setup in this section. With such flexibility, you can just about build anything you dream up.
The 'Preview' option provides a live preview of the data your blueprint will generate, giving you the opportunity to edit any of your column's definitions before generating your data. Here's a preview of my data. Because I have two tables defined, it provides me two views to review:


Finally, OADG offers three file output formats: CSV, JSON or a SQL script ready for upload directly into your table(s).

And here are a few pics of my results in each format.

As you can see, data generation is lightning fast for one million rows with eight columns, three of which had formulas. These test runs were ran in OCI Cloud free tier.
| # Rows | CSV | JSON |
| 10,000 | 13 sec | 13 sec |
| 100,000 | 40 sec | 48 sec |
| 1 Million | 5 min | 7 min |
Here are a few tips and hints I thought I'd pass along:


Release 22.1 (May 2022) is the first roll-out of the Data Generator and it is fully-robust as it is. I can't help but dream up of additional iterations the APEX team could deliver in future versions...
Hundreds of fee-based and open-source test data generation tools exist out on the market. When you consider the factors for selecting a tool such as the data types supported, data generation methods, sample data library, performance and cost, the Oracle APEX Data Generator comes out on top. Thanks Oracle APEX team. 🙏