Skip to content
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

File is locked #95

Open
pakosel opened this issue May 25, 2023 · 5 comments
Open

File is locked #95

pakosel opened this issue May 25, 2023 · 5 comments

Comments

@pakosel
Copy link

pakosel commented May 25, 2023

Hi,
Thanks for sharing these examples, they are great. Most of the time all works perfectly but from time to time I'm getting the following error when trying to open the connection to .hyper file:
Tableau.HyperAPI.HyperException: error opening database 'xxxxx': There was an error during loading database: The database file is locked by another process: DatabaseId: 'xxxxxx'

This concerns the situation when a user browses Tableau Server workbook that refers to the same Data Source as I'm trying to access via a code - but even if the user closes a browser, the lock on the .hyper file remains for about 30 more minutes.
Does anyone know how to overcome the locking issues? Thanks,

@jkammerer
Copy link
Collaborator

Hello,
are you opening the .hyper files on the same machine on which Tableau Server is running?

@pakosel
Copy link
Author

pakosel commented Jul 4, 2023

Hi,
Yes, that's exactly my use case - is it supported scenario?

@jkammerer
Copy link
Collaborator

I think that it will be hard to get this to work reliably since the files could always be opened by some user. The supported way to access the hyper files would be to use the Tableau Server REST API to download the datasource, edit this downloaded copy and then publish it again via the REST API.
That way you also don't have to do it on the same machine.

@pakosel
Copy link
Author

pakosel commented Jul 5, 2023

Thanks for the hint but this might be also a problem since the hyper file is several GB of size.... Not even sure if REST API from Tableau could handle downloading such a massive files

@vogelsgesang
Copy link
Contributor

There is also the "Hyper Update Rest API" through which you can modify parts of a Hyper file through the REST API.

You can find an example in https://github.com/tableau/hyper-api-samples/blob/main/Community-Supported/flights-data-incremental-refresh/flights-data-incremental-refresh.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants