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.
- From the ConverterPro window, click
.
- From the Tools menu, select Define Data Generation Function. The Data Generation Function Wizard - Function Creation Instructions page appears.
- Select Use randomly selected data from an external data source and click Next. The Data Generation Function Wizard - Data Connector Selection page appears.
- In the Connector Name list select connector templates. The Open Connection Template dialog box appears.
- Select the connector created in Tutorial 1 and click OK. The database connector dialog box appears with the information from the template filled in.
- Click Connect to validate the connection, then click OK on the validation message box.
- Click Next. The Table/View Selection pane appears.
- Select the dbo.authors table from the Available Record Layouts box and click to add it to the Selected Record Layouts box.
- Click Next. The Data Generation Function Wizard - Return Column/Field Selection page appears.
- From the Column/Field to be Returned from the External Data Source list, select contract.
- Click Next. The Data Generation Function Wizard - Return Value Characteristics page appears.
- Select only the Return a percentage of the values as nulls check box and type 10%.
- Click Next. The Data Generation Function Wizard - Function Editor page appears.
- 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.
- Click Next. The Data Generation Function Wizard - Function Completion page appears.
- In the Name field, type author_contract.
- In the Description field, type My second function.
- From the Category field, select or type Other to save the function in a category called Other.
- Select both the Save as Template and Save in Current Project check boxes.
- Click Save. The Save Data Generation Function As Template dialog box appears.
- 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*