change datasource of a freehand view

Guest shared this question 4 years ago
Answered

Hello,

I have a freehand view (no virtual table) with a certain SQL query. Now I would like to point that view to a different database. As the change datasource option is (as far as I can see) only available for views build from with GUI I supposed that the correct way was to do an export and import.

When I do that an custom import the view I can add the view where I can change the folder / subfolder and the datasource. This works but an extra version of the view is generated attached to the correct datasource but no reports linked.

When I choose for replace existing I can point to the original view but then I am unable to alter the datasource. Changing the datasource mapping in the settings of the import and then replace existing results in no change in the datasource.

How to change a datasource for a freehand SQL. The structure of both databases is the same.

Regards,

JeRoen

Replies (6)

photo
1

Hi JeRoen,

Thanks for reaching out. I didn't have any issues changing data source of my Freehand SQL View upon importing it. I'll lay out the steps I performed and you can let me know how my steps differ.

1. Exported Freehand SQL View

2. Imported via Custom Import

3. Changed from MS SQL Server Test DB to DateTest(2017-2018):

/996b05fcb9891db9c287c39f89176f9d

Original:

/bc315aebf0a805a7b4271372bae85639

New import:

/8a2cecabb8664411ba4e44777f1c14a8

Also, to rule out possibilities in case my replication steps t differ, what version/build of Yellowfin are you using to do this?

Regards,

Mike

photo
1

Like in my original post using the add function on import makes it work. but then a new view is created and all reports are linked to the old view. When I use replace existing this does not work.

I can off course export and import all 23 reports that are linked to the old view but that seems excessive to do.

Regards,

JeRoen

photo
1

Hi JeRoen,

Ah, you're right, sorry about that! Technically, you cannot replace existing to switch the data source, because it's assumed you're replacing content in the specified data source.

That said, if you unzip the yfx file and go to edit the resulting xml file, you'll see where the sourceId and sourcename is defined:

/7a3c5660c157dab32f62ca452ebcf617

You can then find your desired source name in the reportviewsource table:

/0d95e3ec056c4f02ddadd319ab4a9643Change the parameters, and re-attempt import, and you can see it's now changed when you attempt importing it:

/c9b8b48e1f4b1ed10e2a943091486137

/f55773a9d3be7d7e7eb9efc563a2e980

Meaning I could now switch this to Replace Existing and it is linked up to my other data source now, as can be seen in the portion highlighted above.

Please give this a try and let me know if you run into any issues.


Regards,

Mike

photo
1

Hello Mike,

Thanks for letting me know I can change the export on this. Good to know.

We managed by importing to another folder and remove / replace.

Regards,

JeRoen

photo
1

Hi JeRoen,

This is Eric, filling in for Mike as he's out of office this week. Sounds like you've got the solution you were looking for here?

Thanks,

Eric

photo
1

Hi JeRoen,

I'm going to go ahead and mark this one as Answered since it looks like this has been resolved, but if you have further questions or concerns on this, if you respond, it will re-open the case and put it back in my queue and I'll be happy to help.

Regards,

Mike

Leave a Comment
 
Attach a file