Skip to main content
Solved

Change Source from multiple Workbenches

  • February 21, 2022
  • 4 replies
  • 20 views

My Data moved from Network drive A to Network drive B.

Is there a way to mass change the Source Paths from the Readers in multiple Workbenches at once or do i need to open every Workbench and need to change it manually?

Best answer by nielsgerrits

An alternative is to read workbenches as text, use a StringReplacer to replace the full path. It is hacky, and probably not supported, so use at your own risk. (Backup your workspaces!)

View original
Did this help you find an answer to your question?

4 replies

nielsgerrits
VIP
Forum|alt.badge.img+55
  • Best Answer
  • February 21, 2022

An alternative is to read workbenches as text, use a StringReplacer to replace the full path. It is hacky, and probably not supported, so use at your own risk. (Backup your workspaces!)


caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • February 21, 2022

I support @nielsgerrits​'s solution.

Read as text, look for 

SourceDataset

Your path will be between quotation marks. Do a little transforming on the data, make sure you preserve the line order and write back as text.

Another solution would be reading as fmw (supported) but writing is trickier, writing as xml should work but I never figured it out.


david_r
Celebrity
  • February 21, 2022
nielsgerrits wrote:

An alternative is to read workbenches as text, use a StringReplacer to replace the full path. It is hacky, and probably not supported, so use at your own risk. (Backup your workspaces!)

I agree about this. I think the key to this working is to make sure that the substring to look for and replace must be completely unique, i.e. no risk of accidentally replacing some other but similar substring.

 


mark2atsafe
Safer
Forum|alt.badge.img+46
  • Safer
  • February 28, 2022

Hi. I made this my Question of the Week because I thought it was so interesting. You can find a video demo of my thoughts here: https://www.youtube.com/watch?v=bjZRcyYuOjU&t=1611s

 

In short - I'm not going to say don't use the StringReplacer, but the official solution I think would be to use relative paths, which you'd have to set up beforehand. The video shows how.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings