Test Data Manager

  • 1.  How to handle empty rows in data pool

    Posted Feb 07, 2017 02:42 PM

    I have a scenario with 2 data pools. (Data Pool 1 & Data Pool 2).

     

    Data Pool 1 is publishing data to target (table 1) using select queries and Data Pool 2 is marking a reference to the target table (table 1 ) and publishing the data to a file.

     

    The publish for data pool 2 is failing when an empty row is found in target table (table 1) which was published from

    data pool 1.

     

    We have tried multiple ways to not publish empty row to target but we are not able to find a value to compare with when the query doesn't return any value in data pool.

     

    could you please suggest some way to fix it.



  • 2.  Re: How to handle empty rows in data pool

    Posted Feb 07, 2017 03:59 PM

    Hi Shivani,

     

    When you reference the target table from data pool 2, you should be able to use an @if(...)@ function. The condition to check for would be whether the column is ~EMPTY~, and based on that you should be able to publish appropriate data for the column in data pool 2.

     

    Alternatively, can you publish Data pool 2 after data pool 1 publish completes? I'm wondering why you have empty rows in the target.

     

    Thanks,

    Sameer



  • 3.  Re: How to handle empty rows in data pool

    Posted Feb 07, 2017 04:09 PM

    Thanks Sameer !! I have tried for IFNULL(column,value), but my requirement is if the row is NULL it should not get published to target table but the emrpty rows are getting published.

     

    The data pool has a select query  that is pulling data from source DB based on parameters passed from TDOD.



  • 4.  Re: How to handle empty rows in data pool
    Best Answer

    Posted Feb 08, 2017 01:43 PM

    Shivani,

     

    Why is the SELECT query pulling a completely empty record from the DB? Is it not possible to tweak the SQL to make sure only non-NULL records are selected while doing the publish in the first place?

     

    In Datamaker, I am not aware of a way to indicate: If the value of a column or row is NULL, then exclude this record from the publish. You will need to handle it in a different way as suggested above.

     

    If this is a time-sensitive requirement, I would recommend you to contact your CA Account Manager, who should be able to assist further with this implementation-specific request.

     

    Thanks,

    Sameer