-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server.views.populate_image gives outdated image even with refresh to the datasource #1531
Comments
First, let's address the core issue. Have you tried setting the
The default data-access cache is "low" which means it will reuse the cache as long as possible. From the tsm data-access docs
Now, onto another issue I see: all_workbooks, _ = t_server.workbooks.get()
workbook_obj = next((wb for wb in all_workbooks if wb.name == workbook), None)
if workbook_obj:
print(f"Workbook Found: {workbook_obj.name}")
t_server.workbooks.populate_views(workbook_obj)
sheet_view = next((v for v in workbook_obj.views if v.name == sheet_name), None) tsc endpoints also allow you to Filter and sort what you get from the server so you don't need to iterate over everything. Views even allow you to filter directly by name and workbook name, so you could filter for both criteria in one API call; reducing the load on your server and probably dramatically reducing the run time of your code. |
tsc also offers a method wait_for_job that will handle polling for job status. |
Another thing that occurs to me is that server.workbooks.get is a paginated endpoint, and you do not handle the multiple pages. So if your intended workbook is not within the first 100 results, you end up running the "workbook not found" block. And since no sorting was provided to the .get method, the workbooks are returned in a non-deterministic order. Even though it's a common pattern, even within the samples of this library, to call the variable I recommend using the queryset methods ( |
Seems like you covered all the likely angles. (I'm assuming the Bad Request: Extract Operation not allowed was because the workbook connects directly to the datasource, not to an extract) We should fix that pattern in the samples, I'll open a separate work item for some cleanup I've been doing anyway. |
Describe the bug
Goal: I want to download new images from a tableau sheet. I'm using server.views.populate_image(sheet_name, img_request_option). Everything is working. I made sure to refresh the datasource prior to downloading, but the change isn't reflected. I go on Tableau on my browser and everything seems fine.
However, when I try to refresh the workbook, I get this error:
409090: Bad Request Extract operation for the workbook '...' is not allowed.. (Extract operation for the workbook is not allowed.)
Versions
Details of your environment, including:
To Reproduce
Results
What are the results or error messages received?
NOTE: Be careful not to post user names, passwords, auth tokens or any other private or sensitive information.
The text was updated successfully, but these errors were encountered: