locked
Trigger Run ID Not a GUID (uniqueidentifier) RRS feed

  • Question

  • I am trying to capture the Trigger Id of the pipeline run via @pipeline().TriggerId which is then passed to a t-sql stored procedure in a parameter defined as of type uniqueidentifier.

    It works when run in Debug.

    It works when triggered manually.

    It does not work when run from a Trigger.

    This is because the Run ID of the Trigger is not in the proper format.

    Why?

    The value of the Trigger Run Id from the Trigger Runs is; 08586200862647868022645277174CU17

    This is not in the proper format;

    xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

    It is not a hexidecimal.

    Any help would be greatly appreciated.

    Wednesday, February 12, 2020 3:33 PM

Answers

  • Hello Thobinson01 , 

    In both case the runid is a string , so that's a good news as you are passing that to the proc . The format is different I think that's what your question  was about , but at this time , its by design . 


    Thanks Himanshu

    Wednesday, February 12, 2020 6:17 PM

All replies

  • Hello Thobinson01 , 

    In both case the runid is a string , so that's a good news as you are passing that to the proc . The format is different I think that's what your question  was about , but at this time , its by design . 


    Thanks Himanshu

    Wednesday, February 12, 2020 6:17 PM
  • Can you tell me why it was designed that way? Seems confusing with the @pipeline().TriggerId of the Debug and Manual runs sending properly formatted guids and only the Trigger sending an improperly formatted string that is not a guid.
    Wednesday, February 12, 2020 6:34 PM
  • I also would like to know what the reason is behind this. Thanks.
    Wednesday, February 12, 2020 7:05 PM