Forum Discussion

ssmith-nova's avatar
ssmith-nova
New Contributor III
6 months ago

Capture No valid DataKeys Message

I have a BR that runs a load process using ExecuteParseAndTransform.  When the data source is empty for that profile it throws the "No valid DataKeys" error and stops the job.  I don't even get the opportunity to check the status code of the import. 

Is there a way to catch that error when using the ExecuteParseAndTransform method? 

Thanks,

Scott

  • Try
      ImportInfo  = BRApi.Import.Process.ExecuteParseAndTransform(si, wfClusterPk, String.Empty, Nothing, TransformLoadMethodTypes.Replace, SourceDataOriginTypes.FromDirectConnection, False)
    
    Catch ex As Exception
       log.AppendLine(ex.ToString)
    End Try

    This is what I am doing. 

     

  • ssmith-nova's avatar
    ssmith-nova
    New Contributor III

    Thank you, I missed the obvious.  I was catching the error, but then I was throwing an exception.  If I just capture the error and move on, I am good.  

    • seangly's avatar
      seangly
      New Contributor III

      Hi, 

      Do you know how you can catch the error, when I ouput my exception message, it's seem to be blank.

      Regards,
      Seang

      • ssmith-nova's avatar
        ssmith-nova
        New Contributor III
        Try
          ImportInfo  = BRApi.Import.Process.ExecuteParseAndTransform(si, wfClusterPk, String.Empty, Nothing, TransformLoadMethodTypes.Replace, SourceDataOriginTypes.FromDirectConnection, False)
        
        Catch ex As Exception
           log.AppendLine(ex.ToString)
        End Try

        This is what I am doing.