Forum Discussion
3 Replies
- MarcusHValued Contributor
Books are not exported by Load/Extract; they are text files that can be stored anywhere and might not even be in OneStream. If you are sure all the Books are held in the OneStream database somewhere you can write a Business Rule that queries the FileInfo table to get a list of books that are stored in the database:
SELECT Name, FolderFullName, Description, ContentFileExtension FROM FileInfo WHERE (Name LIKE '%.xfdoc.%')
Process the returned rows and concatenate the FolderFullName and Name fields. Pass that through to BRApi.FileSystem.GetFile and read the file contents to pick out the Cube Views.
You could skip the GetFile step and read the file contents directly from the database:
SELECT FI.Name, FI.FolderFullName, FI.Description, FI.ContentFileExtension, FC.ContentFileBytes FROM FileInfo AS FI INNER JOIN FileContents AS FC ON FI.Name = FC.Name AND FI.FolderFullName = FC.FolderFullName WHERE (FI.Name LIKE '%.xfdoc.%')
- jacidoyoNew Contributor II
Hello Marcus,
Thanks for the answer!
I did the GetFile step and got a list of my books but I cannot see the content to search through and look for cube views used in the definition of the book.
I used an SQL Data Adapter and just ran the SQL Query. Should I have done it differently?
Thanks
- MarcusHValued Contributor
Post the Business Rule script that you are using.
Related Content
- 9 months ago