How do I recover a View in Yellowfin 6.3

Padma Vayuvegula shared this problem 2 years ago
Resolved

I am trying to move all the reports from Yellowfin 6.3 to Yellowfin 7.1, however in the process looks like i happen to have deleted a view from production.

I checked for back up everywhere, also spoke with the DB guys, but no luck.


Is there a way i can get that View back.

Please help.

Comments (18)

photo
1

Hello Padma,


Thanks for reaching out with the issue you're having. I'd like to start by informing you that Yellowfin 7.1 is currently in end of life support. That means it will only receive critical updates at this time. As of August of this year, Yellowfin 7.1 will no longer receive updates or support. I recommend planning your upgrade path to 7.3 or our upcoming 7.3+ release. You should use these best practices to plan your upgrade path. Although our 6.x series is no longer supported, I'll offer what assistance I can in this matter.


It's unfortunate you don't have a DB backup. I'd ensure you implement a proper backup scheme as part of your upgrade path. Luckily, when a view is deleted in Yellowfin the record remains in the YF Config DB! Before running any queries against the Yellowfin Configuration Database directly, make sure you have a full backup of both your Yellowfin Config DB and your Yellowfin Installation folder. Querying the YF Config DB directly is not supported.


The information you'll be after will be in the ReportView table. There is a column in this table (ViewStatusCode) that is set to 'DELETED' when you delete a view. You can run an update query against this table to set this back to 'OPEN' in order to restore access to the view. Start by getting your ViewId:


  1. SELECT * FROM ReportView WHERE ViewStatusCode='DELETED';

The ViewDescription should contain your View's Name. Once you find it, note the ViewId. Then run your UPDATE query:


  1. UPDATE ReportView SET ViewStatusCode='OPEN' WHERE ViewId=xxxx;

where xxxx is the ViewId you find in your previous SELECT statement.


Now restart Yellowfin and the view should return. Let me know how this goes.


Thanks,

Ryan

photo
1

Thank a lot for your response.


Where can I find the Report View Table?

photo
1

hey Ryan,


Would you mind sharing a few screenshots if that is possible, and yeah we are hoping g to upgrade this year..

Thank you

photo
1

Hi Padma,


The ReportView table will be part of the Yellowfin Configuration Database. This is the database you selected to install into when you first installed Yellowfin and will be dependent on your environment. If you're unsure as to the location of your Yellowfin Configuration Database you'll want to speak with your local System Administrator.


Thanks,

Ryan

photo
1

Hey Ryan,


I was able to find that column, now can you also guide where am i running the query?

Am i creating a calculated field with freehand SQL?

or am I supposed to run this query in the DB

photo
1

Hi Padma,


If you're unsure as to how to query the Yellowfin Configuration Database, I recommend running this past your internal Database Administrators or IT Resource. Running queries directly against the Yellowfin Configuration Database can result in irrevocable data loss. Your Database Administrator will have the proper tools and access to effectively run the queries I've linked.


Thanks,

Ryan

photo
1

Hi Ryan,


That totally makes sense.. Thank you so much for your help I really Appreciate that.

Will let you know shortly after the DB's help out


Thanks,

Padma

photo
1

Hi Padma,


I look forward to hearing the results.


Thank you,

Ryan

photo
1

Hey Ryan,


looks like they are able to find the view, my only question to you is will i be able to recover the reports with this view??

photo
1

Hi Padma,


I'm glad you were able to get the view recovered. I didn't think about the reports! The following query can be run, using the ViewId from the previous queries, to restore the reports:


  1. UPDATE ReportHeader SET ReportStatusCode='OPEN' WHERE ViewId='xxxx';

where xxxx will be the ViewId you used to restore your view.


Let me know if this gets you back up and running!


Thank you,

Ryan

photo
1

Hi Ryan,


Looks like we haven't got any reports.

I am attaching a screen shot, if that helps.


Thanks

Padma

photo
1

Hi Padma,


I notice that a query is being run with a WHERE IN clause. Did you delete multiple views? You should only have to dictate one ViewId to restore the reports. You can see if you have any delete reports with a SELECT query against the ReportHeader table:


  1. SELECT ReportName,ViewId FROM ReportHeader WHERE ReportStatusCode='DELETED';

This will show deleted reports. You're going to need the ViewId from the single view you restored yesterday to make the query in my last response work properly. Is there a reason you are running the query against multiple ViewId's?


Thanks,

Ryan

photo
1

Hi Ryan,


Ah, I recently joined, not sure, but there are so many views when we tried to find 1 view.

that view had 2 to 3 View Id's so we are trying to run, reports against all the view ID's

Where can i find the report Header table?


Thanks

Padma

photo
1

Hi Padma,


I recommend speaking with the Database Administrators who ran the query that restored the View when we first started troubleshooting this. The query they ran contains the ViewId needed for the subsequent queries.


Thank you,

Ryan

photo
1

Hi Ryan,


I sent them the details, I found the table too, just waiting for results to come up once they run the query.


Thanks for your support

Appreciated


Will keep you posted


Padma

photo
1

Hi Padma,


I look forward to the results.


Thanks,

Ryan

photo
1

Hi Ryan,


We got the view and the Reports back


Thank you so much..


Thanks

Padma

photo
1

Hi Padma,


I'm glad to hear you were able to recovery everything! I'll go ahead and mark this as resolved. If you have any further questions or issues don't hesitate to contact us.


Thanks,

Ryan