tableau / server-client-python

A Python library for the Tableau Server REST API
https://tableau.github.io/server-client-python/
MIT License
660 stars 421 forks source link

Workbook Publish - Hidden Views Not In... #838

Open bryceglarsen opened 3 years ago

bryceglarsen commented 3 years ago

614 added the ability to hide views when publishing. However, when trying to publish a workbook that is already on the server, we're only aware of the name of the views that are not hidden.

It would be ideal if we could do the inverse of hidden_views, such as published_views or hidden_views not in [...]. Only way I can think to do this currently is publish in a staging environment to compare the list of views or parse the xml itself.

Any feedback is appreciated.

bryceglarsen commented 3 years ago

Update: able to supplement this with Tableau Document API to get full list of views/sheets and generate list of hidden_views.

jorwoods commented 7 months ago

I found a workaround. You can query the metadata API for the already published workbook luid and ask what views do not have a path value. Those would be hidden.

query hidden_views($luid: String) {
  workbooks(filter:{luid:$luid}){
    views(filter:{path:""}) {
      name
    }
  }
}
bryceglarsen commented 7 months ago

@jorwoods We need a way to integrate our thread from slack 😆

This is good for things that already exist on the server, but think adding include_views would have to work by leveraging Document API under the hood.

jorwoods commented 7 months ago

Oh, are you looking to get the sheets that aren't hidden by being parts of dashboards or a viz in tooltip?

bryceglarsen commented 7 months ago

Originally posted this as desire to have an inverse of hidden_views. So if you always know you're publishing two tabs of "Summary" and "Details" but may occasionally work on an ad-hoc analysis on a new sheet you don't have to worry about updating the list of hidden views.

This is similar to how we're doing it with some pre-processing of the XML, but would be nice to add to TSC directly.