That's interesting...I had always assumed that field worked, but all mine are showing as False too. That doesn't seem right...the only other way I know how is by ripping apart the workbook xml and investigating the Sheets.
There is a suppressed comment on the "published" field that says: "Defaults to false, and I can't see it getting used." So, that field does not seem to serve any purpose, at present.
Aside from this, though, I wasn't aware that there could be a workbook and corresponding view in the Repository and it not be published. As far as I know, when a workbook is deleted, those records get removed, and when a workbook is republished, no trace of the old record is left behind. What am I missing?
Yep I'm seeing the same thing.....far as I can tell the workbooks table only contains the current records, it's the hist_workbooks table which includse records for workbooks which no longer exist.
I'm using the workbook table and not the hist and inner joining it to the views and views_stats tables.
Still, I'm getting workbooks and views which are no longer published
In that case I'm very confused....
If I do a count of just the workbooks table without joining it to anything, it matches exactly the number of workbooks we have currently on Server, even broken down by each site.
So I'm not sure how it would be possible for inactive workbooks to come up given an inner join with this table.
Could you provide more info on which columns you're joining? I'd also suggest checking the checking the default Tableau admin views as reference Server Admin View Workbooks
This goes against my understanding of the way this all works---enough so to make me suspect a misinterpretation of some sort. Could it be that the workbooks are still published, but your account lacks the privileges to see them when interacting with Tableau Server? Perhaps they are in a different "site" or something?
Remember that the readonly Repository user can see all of the records, not just the ones that a logged in Tableau user might see. And, in a multi-site setup, no logged in Tableau user will see everything---not even an admin, who has to pick a site when they log in.
Can you provide more information?
This is what i'm joining:
views_stats (view Id) INNER JOIN to views (Id)
views (Workbook Id) INNER JOIN to workbooks (Id)
We only use one site, and I'm using the admin user that can access to all reports.
Which information can help? Please see my comment above regarding the tables I'm using and how I joined them.
Based on your description, you are using a join that looks pretty much like this:
FROM views_stats AS vs
INNER JOIN views AS v ON v.id = vs.view_id
INNER JOIN workbooks AS w ON w.id = v.workbook_id
And you have only one site, yet the query is somehow returning workbooks that are not actually published. I don't think this should be possible.
One thing to consider is that not every record in the views_stats table needs to correspond to a view. Some of them can correspond to a "shared_view," and in that case, the view_id would (I think) be NULL. Still, that shouldn't be the cause of encountering non-published workbooks.
At this point, if it were me, I would determine one or more workbooks that show up via your query, which do not appear to be published. Then I would dive into investigating them (probably focusing on just one). Who, exactly is listed as the owner of the workbook? Can that person view the workbook? Does the next_gen_permissions table have any entries for the workbook, and what are they? Permissions records can be a bit tricky to understand, but perhaps maybe they play a role? In general, I would just dig into why they are not showing up somewhere, because if they are listed in your database, then they should be published.
Or, hmmm... What, exactly, is making you think that they are not published? Is it that they are not showing up in the web UI (VizPortal)? Could it be that the fault lies in Search Server? If the indexing in Search Server is incomplete, for some reason, then some workbooks might not appear in VizPortal. You can re-index, yourself, if you want to experiment: Rebuild the Search Index
Thank you for your answer.
The views are not published because I republished the workbooks without them.
One thing I noticed, is that complete workbooks I removed doesn't appear in my query results.
Ah! That gives me something I can definitely look into. I'll let you know what I find out.
Limor, I did some experimentation by publishing a workbook and then republishing it with some views deleted. When I checked in the database, I found only the reduced number of views present. I repeated this experiment with "Show Sheets as Tabs" selected and saw the same results. I also tried just deselecting them as a view to show. Nothing I did seemed to leave any unwanted views records behind.
Can you do some investigating and experiment with this a little to see if you can recreate it? Maybe look at the workbooks and views affected and see if there is any other common theme? As an aside, I was using a pre-release version of Tableau 9.1 for my tests, but I don't think this code has changed recently, anyway.