Test Data Manager

  • 1.  Publishing of Data

    Posted Nov 07, 2016 04:59 AM

    I want to write the data from source to repository for multiple tables. I have used join statement to fetch the results.

    Is it possible to write the data to multiple tables using a single sql statement or we should go with Sub setting?



  • 2.  Re: Publishing of Data

    Posted Nov 07, 2016 10:20 AM

    Hi Jami,

     

    Can you provide more details about the single SQL statement you are referring to, and also the relationship information between the tables? How does that one statement determine data to be entered in the various tables?

     

    If the multiple tables you are referring to are related by primary-foreign key relationships (or custom relationships that you have defined within Datamaker), and you make sure you register all the tables in the project and version that you are planning to publish the data with, then the publish job should ensure that the data is inserted in the tables as per the column definitions you have provided for the tables. Datamaker will take care of internally working out the JOINs as per the defined relationships.

     

    Let me know if this helps.



  • 3.  Re: Publishing of Data
    Best Answer

    Posted Nov 07, 2016 10:56 AM

    Hi Jami,

    It is not possible to write to multiple tables. There is a one to one mapping only. This functionality is just to move a sample of data into the repository for writing the data generation rules. Please note that if you wish to move data from multiple tables into any target database, then GTSubset is the right too for it.

     

    Please find below the steps to move a sample of data into data pools below. You can also view same by clicking on this link.

    http://www.ca.com/us/services-support/ca-support/ca-support-online/knowledge-base-articles.tec1229403.html

     

    Introduction:
    This document enlists steps to write the data to repository from source/target database in Datamaker.

    Environment:
    Datamaker 3.2.2 and later (either Oracle or MS SQL Server repository)
    Instructions:
    Pre-requisites:

    1. Make sure the table(s) are registered at the version level of your Datapool.

    2. The context is set to at the Data pool level into which the data needs to be moved into.

    3. All the levels under the version level (Data set, Data Group and Data Pool) need to have the setting "Make Test Data available for external use" enabled. This can be found under the properties page of each level.

    Steps:

    1. Log into GTDatamaker.

    2. Click the source/target SQL window button.

    3. Write your query to retrieve data from your registered table and execute it to display the result.

    4. Select "Change context" from the top right hand side and click on the play button.

    5. Select the Data Pool into which the data needs to be written. The context is now set to the right position.

    6. Now select "Write to Test Data Repository" from the top right hand side and click on the play button.

    7. Click on the yes button of the next page to confirm the action.

    We have now successfully moved the data from our source/target table into the repository database.

     

     

    Additional Information:
    It is only recommended to write data to data pool if the data is small (about 20-30K records depending on record length). If the result set is large so that it exceeds the memory limitation of 32-bit Datamaker process, the program may crash. In such cases, an alternate approach needs to be taken depending on the use case.

    If you face any issues or have any questions about the steps, please open a support case by going to https://support.ca.com/irj/portal/anonymous/newhome or by calling customer care at http://www3.ca.com/us/support/customer-assistance.aspx.

     

    Regards,

    Aditi Kapur

    Sr. Support Engineer