I was wondering if you were able to get REST API to edit the data source in a published workbook?
if not, let me know so that i might be able to give you a sample.
Take a look at the new Document API coming in 10 (in the current Beta). This will allow you to change the datasource programmatically within a twb. You would need to use the API to download the file, then make a call to change the datasource within the file and then republish.