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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Fabric Update Carousel

Fabric Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.