Skip to main content
Solved

Change Source from multiple Workbenches

  • February 21, 2022
  • 4 replies
  • 28 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!)

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • 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
  • 571 replies
  • 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
  • 8391 replies
  • 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!)

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+56
  • Safer
  • 2554 replies
  • 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.