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

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Reply
munindra
Frequent Visitor

passing the dynamically created file to notebook

hello all, i made the datapipeline while passing  the source from http and used @concat('user_1',utcNow(),'.txt') expression

to make the destination file in copy activity and i am trying to pass this filename to notebook as parameter but notebook execution getting failed.could any one help with the expression for accessing the filename of copy data activity dynamically to the notebook or suggest me any other ways to it.
munindra_0-1734666424197.png

 

1 ACCEPTED SOLUTION
spencer_sa
Super User
Super User

Firstly, in order to avoid race conditions on using utcNow in multiple places and getting different answers, I'd probably create a pipeline variable for the filename and 'Set Variable activity' it to be @concat('user_1', utcNow(), '.txt')
Then I'd use that variable as both the destination filename *and* a parameter in the Notebook activity.  And then in the Notebook I'd have a parameter cell that uses the filename parameter.
So:
Pipeline

spencer_sa_1-1734690071852.png


Variable setup

spencer_sa_0-1734690028026.png

Set Variable activity

spencer_sa_2-1734690134252.png

Copy Data Activity destination

spencer_sa_3-1734690225162.png

Notebook activity

spencer_sa_4-1734690276996.png

And the notebook itself

spencer_sa_5-1734690355772.png

 

If this helps, please consider Accepting as a Solution so others can find it more easily.

View solution in original post

1 REPLY 1
spencer_sa
Super User
Super User

Firstly, in order to avoid race conditions on using utcNow in multiple places and getting different answers, I'd probably create a pipeline variable for the filename and 'Set Variable activity' it to be @concat('user_1', utcNow(), '.txt')
Then I'd use that variable as both the destination filename *and* a parameter in the Notebook activity.  And then in the Notebook I'd have a parameter cell that uses the filename parameter.
So:
Pipeline

spencer_sa_1-1734690071852.png


Variable setup

spencer_sa_0-1734690028026.png

Set Variable activity

spencer_sa_2-1734690134252.png

Copy Data Activity destination

spencer_sa_3-1734690225162.png

Notebook activity

spencer_sa_4-1734690276996.png

And the notebook itself

spencer_sa_5-1734690355772.png

 

If this helps, please consider Accepting as a Solution so others can find it more easily.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.