Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
pmscorca
Kudo Kingpin
Kudo Kingpin

Resetting a string pipeline variable

Hi,

inside a my pipeline I've implemented some set variable activities that operate on strings. In particular I'd like to reset the value of a string pipeline variable as a blank value.

Is the correct method to use

@''

as a dynamic content?

It doesn't exist any specific espression function.

Thanks

1 ACCEPTED SOLUTION

Hi @pmscorca ,

  • You’re right that a dedicated reset function would be cleaner, but currently Fabric/ADF pipelines don’t support user-defined functions or setting variables to 'null'.
  • The supported and recommended approach is to explicitly overwrite the variable with an empty string:
  • Set Variable activity → value set to ' ' (empty string)
  • Internally this is treated as a reset state, even though the run output may show "\n" due to UI serialization.
  • For cleaner design, a common pattern is to encapsulate all variable resets inside a small reusable pipeline (called via Execute Pipeline), which effectively acts as a “reset function” while staying within supported features.

vsshirivolu_1-1769060763910.png




vsshirivolu_0-1769060716565.png

 

View solution in original post

8 REPLIES 8
v-sshirivolu
Community Support
Community Support

Hi @pmscorca,

 

In Microsoft Fabric Data Factory, string pipeline variables cannot be set to null, and there is no specific function to clear or reset a string value. Since variables are strongly typed, the only way to reset a string variable is to assign it an empty string. You can do this in a Set variable activity by entering an empty string literal ('' or "") as dynamic content. This method is intentional and is the recommended way to represent a blank string value in Fabric pipelines.

 

Thank you.

Hi, thanks for your reply.
Therefore I need to write

('')

or

("")

as a dynamic content, isn't it?

Hi @pmscorca ,
Yes, that’s correct. Use an empty string ('' or "") in the Set variable activity to reset the string variable.

Ok, thanks but I think that it could be more cleaner to have a specific function.

Hi @pmscorca ,

  • You’re right that a dedicated reset function would be cleaner, but currently Fabric/ADF pipelines don’t support user-defined functions or setting variables to 'null'.
  • The supported and recommended approach is to explicitly overwrite the variable with an empty string:
  • Set Variable activity → value set to ' ' (empty string)
  • Internally this is treated as a reset state, even though the run output may show "\n" due to UI serialization.
  • For cleaner design, a common pattern is to encapsulate all variable resets inside a small reusable pipeline (called via Execute Pipeline), which effectively acts as a “reset function” while staying within supported features.

vsshirivolu_1-1769060763910.png




vsshirivolu_0-1769060716565.png

 

Ok, but I need to reset a string variable with a blank or empty string, not with a null.

About implementing a reusable pipeline to reset variables it should be called inside a main pipeline that has these variables, but the variables aren't global ones or you think to use pipeline return values, isn't it? Thanks

HI @pmscorca ,
Yes, the reset is to a blank/empty string, not null. In Fabric/ADF pipelines, setting a string variable to '' is the only supported way to clear it, even though the run output may show "\n" due to UI serialization, it’s still treated as empty in expressions. Pipeline variables aren’t global, so a reusable child pipeline can’t directly reset variables in the parent unless pipeline return values are used and then assigned back in the main pipeline. Otherwise, explicitly using Set variable - '' in the main pipeline remains the simplest and cleanest supported approach.

Hi @pmscorca ,

I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

June Fabric Update Carousel

Fabric Monthly Update - June 2026

Check out the June 2026 Fabric update to learn about new features.

Top Solution Authors