Test Data Manager

Tech Tip: Can users restrict non-driving rows in Subset?

  • 1.  Tech Tip: Can users restrict non-driving rows in Subset?

    Posted Sep 27, 2016 03:34 PM

    Introduction: 

    Some customers want to control the number of child rows being brought in from Subset. The main purpose of this is to limit the Subset size by the driving table and by the child tables that might have large numbers of transactions. This is possible and you can restrict non-driving rows from GTSubset.

    http://www.ca.com/us/support/ca-support-online/product-content/knowledgebase-articles/tec1998122.aspx  

     

    Question: 

    Can users restrict non-driving rows in Subset?

    Environment:  

    • CA Test Data Manager (TDM)- Subset
    • Product release versions 3.6 and above.
    • The “rownum < x” approach that is suggested below is only supported on Oracle. 

    Answer: 

    Yes, you can restrict non-driving rows from GTSubset by adding SQL to a table relationship. See the below example:

    1. In Subset, in the left-hand pane, click on the table that you would like to add the SQL relationship rule to.
    2. Choose the 'Edit Link' option from the list. 



    3. In the 'Edit Link' window, click on the 'Columns' tab.
    4. Select the columns which you would like to add a rule to.  In this screenshot example, you can see that the 'PERSON_ID' (PK) and 'ORDER_ID' (PK) have been chosen. 

    5. Click on the 'SQL' tab to add a condition to. If the SQL added references other tables, for example one or more in statements, the SQL objects should be fully qualified. For example, TRAVEL.CUSTOMER.CUSTOMER_ID and NO alias names used. The SQL will look like the screenshot below: The “rownum < x” approach that is suggested is only supported on Oracle. You can add similar clauses to restrict the number of records on other Database platforms.



    6. Add a 'Rule Description' name if you would like.
    7. Click the 'OK' button. 
    8. You will receive a 'Changes Saved' message. Click the 'OK' button.

    Additional Information: