Cannot find database table for folders

Amber Cundall shared this question 2 weeks ago
Awaiting Reply

Hi there,


We have a customer who is trying to delete folders but is unable to due to data existing within them. The data within the folders is private and cannot be viewed.


We thought we could get around this easily by deleting the folders directly in the yellowfin database but have been unable to find what table this sits within.


Can you please help assist on how to remove these easily?


Thanks,

Amber

Comments (2)

photo
1

Hi Amber,

Thanks for reaching us.

When running any queries directly against the Yellowfin Configuration Database it's possible to cause irrevocable data loss. This process isn't directly supported nor recommended unless otherwise advised to do so. Before running any queries against your Yellowfin Configuration Database, please make sure you have full, up-to-date backups of both your Yellowfin Configuration Database and your Yellowfin Installation folder. If something goes wrong you can revert back to your current state. The first step is identifying the folder in the Config DB. You can view all folders with the following query:


SELECT ContentTypeCode, ContentCode FROM ContentManagement;

Use this to identify the folder(s) you wish to delete. We'll keep the value of ContentCode for the next query.

The ReportHeader table contains a record for each existing report. The following query will allow you to identify any remaining active reports inside a content folder:


SELECT ReportId, ReportName FROM ReportHeader WHERE SubCategoryCode IN ($) AND ReportStatusCode != 'DELETED';

where $ represents the list of ContentCode values from above. This will give you a list of the remaining active reports in the folder you wish to delete.

From here, you can use the list of ReportId's to set them to DELETED. The better solution is to set their folder from here, to prevent from deleting someone's work. This can be done by setting the ReportHeader.CategoryCode to equal the value of ContentManagement.ContentTypecode and the value of ReportHeader.SubCategoryCode to equal the value of ContentManagement.ContentCode, using a ReportID as the WHERE clause.

Please note the latter queries should ONLY be used if a typical means via the UI cannot be accomplished.

See how you go with it and let me know if you have any questions.

Regards,

Mahesh

photo
1

H Amber,

Hope you are doing well.

Can please let me know if you have any questions?

Kind Regards,

Mahesh