Tutorial 7: Create Data Generation Function with External Data Source


Using the Data Generation Function Wizard, users can create a new function with or without external data sources. In this tutorial, users will learn how to define a Data Generation Function for use in another tutorial by using an external data source.

Conversion Type: Many-to-One.

After completing this tutorial, users will be able to do the following:

  • Define a Data Generation function using an external data source.
  • Create a conversion specification using the new Data Generation function.
  • Save the Data Generation function as a template.

Source and Target Data Descriptions

Data Source

Connector Type: Data Generation

Connector Type: MS SQL Server database

Source Data Location: tutorial1, located in the local repository

This connector was created in Tutorial 1.

Create a New Data Generation Function

After starting ConverterPro, begin defining the Data Generation function.

  1. From  the  ConverterPro window, click image2021-8-27_16-36-39.png.
  2. From the Tools menu, select Define Data Generation Function. The Data Generation Function Wizard - Function Creation Instructions page appears.
  3. Select Use randomly selected data from an external data source and click Next. The Data Generation Function Wizard - Data Connector Selection page appears.
  4. In the Connector Name list select connector templates. The Open Connection Template dialog box appears.
  5. Select the connector created in Tutorial 1 and click OK. The database connector dialog box appears with the information from the template filled in.
  6. Click Connect to validate the connection, then click OK on the validation message box.
  7. Click Next. The Table/View Selection pane appears.
  8. Select the dbo.authors table from the Available Record Layouts box and click    to add it to the Selected Record Layouts box.
  9. Click Next. The Data Generation Function Wizard - Return Column/Field Selection page appears.
  10. From the Column/Field to be Returned from the External Data Source list, select contract.
  11. Click Next. The Data Generation Function Wizard - Return Value Characteristics page appears.
  12. Select only the Return a percentage of the values as nulls check box and type 10%.
  13. Click Next. The Data Generation Function Wizard - Function Editor page appears.
  14. The RETURN field contains the field selected in the previous page. If a field had not been selected, a RETURN would have to be created manually.
  15. Click Next. The Data Generation Function Wizard - Function Completion page appears.
  16. In the Name field, type author_contract.
  17. In the Description field, type My second function.
  18. From the Category field, select or type Other to save the function in a category called Other.
  19. Select both the Save as Template and Save in Current Project check boxes.
  20. Click Save. The Save Data Generation Function As Template dialog box appears.
  21. Click OK. The function is saved in the current conversion specification and in the specified repository.

Tutorial 7 is now complete.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*