Skip to content

Auto-Generate Model from Database

Generating a DATAMIMIC model from a database enables you to quickly create data generation models based on your existing database schema. Follow the steps below to achieve this.

Steps

1. Ensure you have a project

Start with an existing project or create a new one (e.g., an empty project).

2. Add a new file in the Models section

Click the plus icon to add a new file in the Models section of your project.

3. Select "DATAMIMIC Model from Database to generate data"

In the File Wizard, choose the option "DATAMIMIC Model from Database to generate data" and click Next.

Select Model from Database
Select Model from Database

4. Select the data set you want to generate from the Database

  • Full Set: If you choose to generate the model based on the entire data set available in the chosen database, you will proceed to the next step, where you’ll provide a file name for your DATAMIMIC model.
  • Sub Set: If you choose to work with a subset of the data, you will be redirected to another view where you can select specific data sets and columns to include. Learn more about selecting subsets of data.

4.1 Selecting Full Set Of database generation

  1. Enter a file name:

    • Provide a name for your new DATAMIMIC model file, for example, customer_table, and click Next.

    Enter File Name
    Enter File Name

  2. Configure source and/or target Database:

    • Choose the database type for your source and target databases. Make sure you have created the databases in the Environment Settings before.

    Configure Database Settings
    Configure Database Settings

  3. Review and Confirm:

    • Review the settings in the confirmation step and click Create to generate the DATAMIMIC model.
  4. Review Created Model:

    • A new DATAMIMIC model is created to generate the data from the specified database.

4.2 Selecting subset of database generation

When you opt to generate a DATAMIMIC model based on a subset of your data, you will be redirected to a new UI view that provides an overview of your database environment. This view allows you to customize your data selection and model generation more precisely.

In the new UI view, you will see a detailed overview of the database you created in the environment. Learn more about DATAMIMIC Database View

Here’s how to navigate and use this view:

Database View Subset Selection
Database View Subset Selection
  1. Database Overview:
    • The UI will display a comprehensive view of your database, including tables and columns available for selection.
    • You can browse through the database schema to understand the structure and contents of your data.
  2. Selecting Columns:
    • Depends On the database environment you created in the project, you can select which environment to generate model from here.
    • Choose the specific columns you want to include in your DATAMIMIC model. This allows you to focus on relevant data and exclude unnecessary information.
    • You can select multiple columns and configure them according to your needs.
  3. Customizations:
    • Select Scripts: Choose which scripts to use based on the selected columns. This helps tailor the data processing to fit your specific requirements.
    • Choose Generators: Specify custom generators that should be applied to the selected columns. This ensures that the generated model is optimized according to your selected data.
  4. Apply and Confirm:

    • Once you have made your selections and customizations, confirm your choices to proceed by clicking the Create File Button.
  5. Enter a file name:

    • Provide a name for your new DATAMIMIC model file, for example, customer_table, and click Next.

    Enter File Name
    Enter File Name

  6. Configure your target Database (Optional):

    • Choose the database type for your target databases. Make sure you have created the databases in the Environment Settings before.
  7. Review and Confirm:

    • Review the settings in the confirmation step and click Create to generate the DATAMIMIC model.
  8. Review Created Model:

    • A new DATAMIMIC model is created to generate the data from the specified database.

Further Refinement

In further refinement, this model can be adjusted to utilize DATAMIMIC generators to apply dynamic values for one or many of the available keys. This allows for more complex data generation scenarios tailored to your specific needs.