tableau / server-client-python

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

Request: Connection.Queryband & Connection.initial_sql #160

Open r-richmond opened 7 years ago

r-richmond commented 7 years ago

Very similar to https://github.com/tableau/document-api-python/issues/109 & https://github.com/tableau/document-api-python/issues/110

I'd like the ability to edit these connection fields through this package.

Glancing at the code it looks like a simple copy paste expansion... but i'm not super familiar with rest apis and any magic going on here.

t8y8 commented 7 years ago

The rest api doesn't support this on the Server side -- updating the library model wouldn't have an effect.

I think the preferred route is to keep document operations in the document-api, and then you'd publish that updated twb/tds via the SCL.

r-richmond commented 7 years ago

so, i've been trying to accomplish that all day however, there are a couple pain points here.

1) it looks like i'm unable to upload .twb with this 2) its painful to download 1500 workbooks, make one small change and then re-upload all of them. (I would argue that those datasource settings are at the same level as username / password / port and thus should be modifiable from the rest api as well). 3) Sometimes the larger workbooks fail when re-uploading :/

r-richmond commented 7 years ago

Is there a good place on github to request that initial sql and query bands be added to the rest api?

https://onlinehelp.tableau.com/current/api/rest_api/en-us/help.htm#REST/rest_api_ref.htm#Update_Datasource_Connection%3FTocPath%3DAPI%2520Reference%7C_____80

LGraber commented 7 years ago

This is the correct place to add that request. We can certainly take a look but we have a number of other items on on backlog right now. Also, it feels like you are trying to set a policy on the server that should apply to all datasources (probably of some type) and that this is just your way of making it to work. Is that accurate?

r-richmond commented 7 years ago

Correct, I'm trying to set all the old workbooks to follow the policy and do it in a bulk manner.

Also it would help for programmatically adding a datasource= (which currently doesn't exist, only )

Basically whenever we need to change or edit this policy it would be very useful to be able to update these things via the rest api as there are significant pain points with downloading everything and reuploading.

LGraber commented 7 years ago

Thanks for the details. I think the policy mechanism itself is an interesting item which I have heard from many customers and might be something we should think about. For the ability to edit more properties of the datasource without having to download it, we will put some thought but I don't know if or when that would happen. Thanks for the feedback!

r-richmond commented 7 years ago

Hey guys, given that TC17 has rolled around I thought now might be a good time to check on the status of this request and the rest API in general.

p.s. I'm here at the conference so if there is a session you'd recommend I check out please let me know.