Forum Discussion

ramankr48's avatar
ramankr48
Icon for Helper II rankHelper II
1 year ago
Solved

Getting error or issue while updating the column in log table in datawarehouse

Hi Team,

 

I have deigned a pipeline where iam running store procedure then updating the pipeline status into the table using script activity, but it's not changing, I have tried different method, check below the sc

 

In this method script activity throwing error saying {Incorrect syntax near '='.}

also tried with this method, creating a parameter at scrpt level


but status is same as default not changing even when sp getting successfully executed

  • Hi ramankr48 ,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    please use the below script in the expression builder to update the Pipeline_Metadata_Log table with success status for the current run id.

     

    @{concat('UPDATE Pipeline_Metadata_Log SET Status = ''Success'' WHERE PipelineRunId= ''', pipeline().RunId, '''')}

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

     

    Thank you!!

5 Replies

  • v-sathmakuri's avatar
    v-sathmakuri
    Icon for Community Support rankCommunity Support

    Hi ramankr48 ,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    please use the below script in the expression builder to update the Pipeline_Metadata_Log table with success status for the current run id.

     

    @{concat('UPDATE Pipeline_Metadata_Log SET Status = ''Success'' WHERE PipelineRunId= ''', pipeline().RunId, '''')}

     

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

     

    Thank you!!

    • NandanHegde's avatar
      NandanHegde
      Icon for Super User rankSuper User

      This can be done without the concat as well as stated below wherein replace == with =

    • ramankr48's avatar
      ramankr48
      Icon for Helper II rankHelper II

      Hi v-sathmakuri 

      the solution you provided it worked, but the same update statement I have tried in adf it worked there but it's not working in fabric,
      1. what is the reason??

      2. so do we need to pass the sql statements in script like this always 

  • you need to update the script activity and use a single = rather than ==

    where pipelinerunid = 

    • ramankr48's avatar
      ramankr48
      Icon for Helper II rankHelper II

      I had tried this earlier also, it was not working, gave some error