Forum

This content is now out of date.

Visit Our Community

Is there a way to update all views to reference a new table?

Hi,

We have a table (table1) currently being referenced in virtually all data views. We have created a new version of this table (table2) and are wondering if there is a bulk way through the database to update all views to look at this new table where the old table is referenced.

We can't alter table1 as it is still required for other functionality in our application.

All columns are the same between table1 and table2 so we simply need the views to use table2 instead.

Thanks,
Mike
Hi guys,

Just following up on this - we'd appreciate any help we can get regarding this.
Unfortunately updating the views manually isn't really an option as it will break existing reports.

Cheers,
Mike
Hi Mike,

Thanks for submitting this question and sorry for the delay in getting back to you.

Couple of things:
1. How many views do you have?
2. What version of Yellowfin are you currently running?
3. Depending on your version you should be able to update your view manually without breaking your reports.

Keep me posted and I we should be able to work something out.

Kind Regards,
Cadell.
Hi Cadell,

Thanks for getting back to me.

1. We have around 50 views, of which virtually all use table1.

2. We are running version 7.1 20150624

3. Can you please give me some more information on how this would work? My understanding is that as soon as you remove a table from a view, all of the associated columns disappear and subsequently they disappear from all reports using them.

We need all existing reports throughout all client orgs to remain in tact and simply reference table2 instead of table1 in all cases.


Thanks,
Mike
Hi Mike,

No problems, glad to help.

Some good news and some bad news.
Good news is you should be able to swap all your reports to use the new table with no problems.

Bad news is you need to do it manually for your 50 views.

Before taking any steps below, please take backups of your data (even though I do not anticipate any problems).

In Yellowfin if a view can no longer find an associated table it will prompt you to give it a new table. This occurs when you access the view editor.

What I would suggest you do if you want all your reports to use "TABLE2" instead of "TABLE1" is to temporarily break the connection to that table and relink it.

1. Rename "TABLE1" in your database to anything else, this will break the connection to that table with Yellowfin.

2. Go into your views - edit each one of them and you should see that "TABLE1" is red and displays as missing.

3. Click "Rename" on the broken table, on the right you will be able to enter a "New Source Name". In this box type in "TABLE2". Click Save. (See screenshot).

Forum image


4. Activate your views.

5. Rename your original table back to "TABLE1".

This should then make all your reports use "TABLE2" in place of "TABLE1".

Please let me know how you go with this and if you have any troubles.

Kind Regards,
Cadell.
Hi Cadell,

Thanks for that! I'll give it a go and let you know if I have any issue.

Thanks again, much appreciated!

Mike
Hi Cadell,

Just want to confirm that this worked perfectly. Thanks again!

Mike
Glad I could help!

Cheers,
Cadell.